/[packages]/backports/8/nextcloud/current/SPECS/nextcloud.spec
ViewVC logotype

Contents of /backports/8/nextcloud/current/SPECS/nextcloud.spec

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1590938 - (show annotations) (download)
Mon Jun 8 06:21:46 2020 UTC (3 years, 10 months ago) by zezinho
Original Path: cauldron/nextcloud/current/SPECS/nextcloud.spec
File size: 7174 byte(s)
no need to obsolete the same package name
1 %define major_version 18
2 %define version %{major_version}.0.5
3 %define rel 2
4 %define prerel %{nil}
5 %define name_root nextcloud
6
7 %if "%{prerel}" != "%{nil}"
8 %define lc_prerel %(echo %{prerel} | tr "A-Z" "a-z")
9 %define release %mkrel 1.%{lc_prerel}.%{rel}
10 %else
11 %define release %mkrel %{rel}
12 %endif
13
14 # exclude PHP dependencies as long as their usage is not proven
15 %define __requires_exclude_from ^%{_datadir}/.*$
16 %define __jar_repack %{nil}
17
18 Summary: Open personal cloud
19 Name: %{name_root}
20 Version: %{version}
21 Release: %{release}
22 License: AGPLv3
23 Group: Networking/WWW
24 Url: http://nextcloud.com
25 Source0: https://download.nextcloud.com/server/releases/%{name_root}-%{version}%{?prerel}.tar.bz2
26 Source1: %{name_root}-httpd.conf
27 Source2: %{name_root}-httpd.inc
28 Source4: %{name_root}-mysql.txt
29 Source5: %{name_root}-postgresql.txt
30 Source7: %{name_root}-config.php
31 Source8: %{name_root}-fpm.conf
32 # Disable the integrity checking whilst a better way to deal with it is found
33 Patch5: %{name_root}-14.4.0-default_integrity_check_disabled.patch
34 # Direct the admin to the correct cli command for upgrades
35 Patch9: %{name_root}-12.0.2-correct-cli-upgrade.patch
36 Requires: php-webinterface >= 3:7.2.0
37 Requires: php-curl >= 3:7.2.0
38 Requires: php-dom >= 3:7.2.0
39 Requires: php-exif >= 3:7.2.0
40 Requires: php-fileinfo >= 3:7.2.0
41 Requires: php-gd >= 3:7.2.0
42 Requires: php-iconv >= 3:7.2.0
43 Requires: php-imagick
44 Recommends: php-intl >= 3:7.2.0
45 Requires: php-json >= 3:7.2.0
46 Requires: php-ldap >= 3:7.2.0
47 Requires: php-mbstring >= 3:7.2.0
48 Requires: php-openssl >= 3:7.2.0
49 Requires: php-pcre >= 3:7.2.0
50 Recommends: php-pcntl >= 3:7.2.0
51 Requires: php-pdo >= 3:7.2.0
52 Requires: php-session >= 3:7.2.0
53 Requires: php-simplexml >= 3:7.2.0
54 Requires: php-xmlwriter >= 3:7.2.0
55 Requires: php-zip >= 3:7.2.0
56 Requires: php-filter >= 3:7.2.0
57 Requires: %{name}-database = %{version}-%{release}
58 Requires: openssl >= 1.0.2f
59 Obsoletes: nextcloud17 <= 18.0.0.0
60 Obsoletes: nextcloud18 < %{version}
61 BuildArch: noarch
62
63 %description
64 A personal cloud server which runs on you personal server
65 and enables accessing your data from everywhere and sharing
66 with other people.
67
68 %package mysql
69 Summary: MySQL database support for NextCloud
70 Provides: %{name}-database = %{version}-%{release}
71 Requires: %{name} = %{version}-%{release}
72 # From getSupportedDatabases, mysql => pdo, mysql
73 Requires: php-pdo_mysql >= 3:7.2.0
74
75 %description mysql
76 This package ensures the necessary dependencies are in place for NextCloud to
77 work with MySQL / MariaDB databases. It does not require a MySQL / MariaDB
78 server to be installed, as you may well wish to use a remote database
79 server.
80 If you want the database to be on the same system as NextCloud itself, you must
81 also install and enable a MySQL / MariaDB server package. See README.mysql for
82 more details.
83
84 %package postgresql
85 Summary: PostgreSQL database support for NextCloud
86 Provides: %{name}-database = %{version}-%{release}
87 Requires: %{name} = %{version}-%{release}
88 # From getSupportedDatabases, pgsql => function, pg_connect
89 Requires: php-pdo_pgsql >= 3:7.2.0
90
91 %description postgresql
92 This package ensures the necessary dependencies are in place for NextCloud to
93 work with a PostgreSQL database. It does not require the PostgreSQL server
94 package to be installed, as you may well wish to use a remote database
95 server.
96 If you want the database to be on the same system as NextCloud itself, you must
97 also install and enable the PostgreSQL server package. See README.postgresql
98 for more details.
99
100 %package sqlite
101 Summary: SQLite 3 database support for NextCloud
102 Provides: %{name}-database = %{version}-%{release}
103 Requires: %{name} = %{version}-%{release}
104 # From getSupportedDatabases, pgsql => class, SQLite3
105 Requires: php-pdo_sqlite >= 3:7.2.0
106 Requires: php-pcre >= 3:7.2.0
107
108 %description sqlite
109 This package ensures the necessary dependencies are in place for NextCloud to
110 work with an SQLite 3 database stored on the local system.
111
112 %prep
113 %setup -q -n nextcloud
114 %autopatch -p 1
115 cp %{SOURCE4} README.mysql
116 cp %{SOURCE5} README.postgresql
117
118 # drop upstream update notification app
119 rm -rf apps/updatenotification
120 # also remove the actual updater
121 rm -rf updater
122
123 %install
124 install -d -m 755 %{buildroot}%{_datadir}/%{name_root}
125 # create nextcloud datadir
126 install -d -m 755 %{buildroot}%{_localstatedir}/lib/%{name_root}/data
127 # create writable app dir for appstore
128 install -d -m 755 %{buildroot}%{_localstatedir}/lib/%{name_root}/apps
129 # create nextcloud sysconfdir
130 install -d -m 755 %{buildroot}%{_sysconfdir}/%{name_root}
131
132 # install content
133 for d in $(find . -mindepth 1 -maxdepth 1 -type d | grep -v config); do
134 cp -a "$d" %{buildroot}%{_datadir}/%{name_root}
135 done
136
137 for f in {*.php,*.html,occ,robots.txt}; do
138 install -p -m 644 "$f" %{buildroot}%{_datadir}/%{name_root}
139 done
140
141 # symlink config dir
142 ln -sf %{_sysconfdir}/%{name_root} %{buildroot}%{_datadir}/%{name_root}/config
143
144 # nextcloud looks for ca-bundle.crt in config dir
145 ln -sf %{_sysconfdir}/pki/tls/certs/ca-bundle.crt %{buildroot}%{_sysconfdir}/%{name_root}/ca-bundle.crt
146
147 # set default config
148 install -p -m 644 %{SOURCE7} %{buildroot}%{_sysconfdir}/%{name_root}/config.php
149
150 install -D -m 644 %{SOURCE1} %{buildroot}%{webappconfdir}/%{name_root}.conf
151 install -D -m 644 %{SOURCE2} %{buildroot}%{webappconfdir}/%{name_root}.inc
152 install -D -m 644 %{SOURCE8} %{buildroot}%{_sysconfdir}/php-fpm.d/%{name_root}.conf
153
154 cat > %{buildroot}%{_datadir}/%{name_root}/.htaccess <<EOF
155 # Version: %{version}
156 EOF
157
158 install -d -m 755 %{buildroot}%{_sysconfdir}/cron.d
159 cat > %{buildroot}%{_sysconfdir}/cron.d/%{name_root} <<EOF
160 # Run cron from to execute task even when no user connected
161 */15 * * * * apache /usr/bin/php -f /usr/share/nextcloud/cron.php
162 EOF
163
164
165 %pre
166 # on update from previous release, move data directory from
167 # %{_localstatedir}/lib/%{name} to %{_localstatedir}/lib/%{name}/data
168 if [ $1 -gt 1 ] ; then
169 if [ -d %{_localstatedir}/lib/%{name_root}/ -a ! -d %{_localstatedir}/lib/%{name_root}/data ]; then
170 mv %{_localstatedir}/lib/%{name_root} %{_localstatedir}/lib/%{name_root}.tmp
171 mkdir %{_localstatedir}/lib/%{name_root}
172 mv %{_localstatedir}/lib/%{name_root}.tmp %{_localstatedir}/lib/%{name_root}/data
173 fi
174 fi
175
176
177 %files
178 %doc AUTHORS config/config.sample.php
179
180 %dir %attr(-,apache,apache) %{_sysconfdir}/%{name_root}
181 %config(noreplace) %attr(0600,apache,apache) %{_sysconfdir}/%{name_root}/config.php
182 %{_sysconfdir}/%{name_root}/ca-bundle.crt
183
184 %{_datadir}/%{name_root}
185
186 %dir %attr(0755,apache,apache) %{_localstatedir}/lib/%{name_root}
187 %dir %attr(0755,apache,apache) %{_localstatedir}/lib/%{name_root}/apps
188 %dir %attr(0750,apache,apache) %{_localstatedir}/lib/%{name_root}/data
189
190 %config(noreplace) %{webappconfdir}/nextcloud.conf
191 %config(noreplace) %{webappconfdir}/nextcloud.inc
192 %config(noreplace) %{_sysconfdir}/cron.d/%{name_root}
193 %config(noreplace) %{_sysconfdir}/php-fpm.d/%{name_root}.conf
194
195 %files mysql
196 %doc README.mysql
197
198 %files postgresql
199 %doc README.postgresql
200
201 %files sqlite

  ViewVC Help
Powered by ViewVC 1.1.30