1 |
neoclust |
1671798 |
%define major_version 21 |
2 |
|
|
%define version %{major_version}.0.0 |
3 |
neoclust |
1672099 |
%define rel 2 |
4 |
joequant |
1639496 |
|
5 |
neoclust |
1671798 |
%define prerel beta6 |
6 |
joequant |
1562464 |
%define name_root nextcloud |
7 |
neoclust |
1671798 |
%define oname server |
8 |
neoclust |
1036847 |
|
9 |
|
|
%if "%{prerel}" != "%{nil}" |
10 |
|
|
%define lc_prerel %(echo %{prerel} | tr "A-Z" "a-z") |
11 |
neoclust |
1671797 |
%define release %mkrel 1.%{lc_prerel}.%{rel} |
12 |
neoclust |
1036847 |
%else |
13 |
|
|
%define release %mkrel %{rel} |
14 |
|
|
%endif |
15 |
|
|
|
16 |
guillomovitch |
1153655 |
# exclude PHP dependencies as long as their usage is not proven |
17 |
|
|
%define __requires_exclude_from ^%{_datadir}/.*$ |
18 |
neoclust |
1036847 |
%define __jar_repack %{nil} |
19 |
|
|
|
20 |
|
|
Summary: Open personal cloud |
21 |
joequant |
1562464 |
Name: %{name_root} |
22 |
neoclust |
1036847 |
Version: %{version} |
23 |
neoclust |
1671797 |
Release: %{release} |
24 |
neoclust |
1036847 |
License: AGPLv3 |
25 |
guillomovitch |
1153655 |
Group: Networking/WWW |
26 |
neoclust |
1038684 |
Url: http://nextcloud.com |
27 |
neoclust |
1671798 |
Source0: https://download.nextcloud.com/server/releases/%{oname}-%{version}%{?prerel}.tar.gz |
28 |
joequant |
1562464 |
Source1: %{name_root}-httpd.conf |
29 |
|
|
Source2: %{name_root}-httpd.inc |
30 |
|
|
Source4: %{name_root}-mysql.txt |
31 |
|
|
Source5: %{name_root}-postgresql.txt |
32 |
|
|
Source7: %{name_root}-config.php |
33 |
|
|
Source8: %{name_root}-fpm.conf |
34 |
neoclust |
1672099 |
Source9: https://github.com/nextcloud/3rdparty/releases/3rdparty-%{version}%{?prerel}.tar.gz |
35 |
|
|
Requires: php-webinterface >= 3:8.0.0 |
36 |
|
|
Requires: php-curl >= 3:8.0.0 |
37 |
|
|
Requires: php-dom >= 3:8.0.0 |
38 |
|
|
Requires: php-exif >= 3:8.0.0 |
39 |
|
|
Requires: php-fileinfo >= 3:8.0.0 |
40 |
|
|
Requires: php-gd >= 3:8.0.0 |
41 |
|
|
Requires: php-iconv >= 3:8.0.0 |
42 |
zezinho |
1430479 |
Requires: php-imagick |
43 |
neoclust |
1672099 |
Recommends: php-intl >= 3:8.0.0 |
44 |
|
|
Requires: php-json >= 3:8.0.0 |
45 |
|
|
Requires: php-ldap >= 3:8.0.0 |
46 |
|
|
Requires: php-mbstring >= 3:8.0.0 |
47 |
|
|
Requires: php-openssl >= 3:8.0.0 |
48 |
|
|
Requires: php-pcre >= 3:8.0.0 |
49 |
|
|
Recommends: php-pcntl >= 3:8.0.0 |
50 |
|
|
Requires: php-pdo >= 3:8.0.0 |
51 |
|
|
Requires: php-session >= 3:8.0.0 |
52 |
|
|
Requires: php-simplexml >= 3:8.0.0 |
53 |
|
|
Requires: php-xmlwriter >= 3:8.0.0 |
54 |
|
|
Requires: php-xmlreader |
55 |
|
|
Requires: php-zip >= 3:8.0.0 |
56 |
|
|
Requires: php-filter >= 3:8.0.0 |
57 |
guillomovitch |
1153655 |
Requires: %{name}-database = %{version}-%{release} |
58 |
joequant |
1562464 |
Requires: openssl >= 1.0.2f |
59 |
|
|
Obsoletes: nextcloud17 <= 18.0.0.0 |
60 |
|
|
Obsoletes: nextcloud18 < %{version} |
61 |
neoclust |
1036847 |
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 |
guillomovitch |
1153655 |
%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 |
neoclust |
1672099 |
Requires: php-pdo_mysql >= 3:8.0.0 |
74 |
guillomovitch |
1153655 |
|
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 |
neoclust |
1672099 |
Requires: php-pdo_pgsql >= 3:8.0.0 |
90 |
guillomovitch |
1153655 |
|
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 |
neoclust |
1672099 |
Requires: php-pdo_sqlite >= 3:8.0.0 |
106 |
|
|
Requires: php-pcre >= 3:8.0.0 |
107 |
guillomovitch |
1153655 |
|
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 |
neoclust |
1036847 |
%prep |
113 |
neoclust |
1671798 |
%setup -q -n %{oname}-%{version}%{?prerel} |
114 |
guillomovitch |
1153655 |
cp %{SOURCE4} README.mysql |
115 |
|
|
cp %{SOURCE5} README.postgresql |
116 |
neoclust |
1672099 |
rm -fr 3rdparty |
117 |
|
|
tar xzvf %{SOURCE9} |
118 |
|
|
mv 3rdparty-%{version}%{?prerel} 3rdparty |
119 |
|
|
exit 1 |
120 |
neoclust |
1671797 |
# drop upstream update notification app |
121 |
|
|
rm -rf apps/updatenotification |
122 |
|
|
# also remove the actual updater |
123 |
|
|
rm -rf updater |
124 |
|
|
|
125 |
neoclust |
1036847 |
%install |
126 |
joequant |
1562464 |
install -d -m 755 %{buildroot}%{_datadir}/%{name_root} |
127 |
guillomovitch |
1153655 |
# create nextcloud datadir |
128 |
joequant |
1562464 |
install -d -m 755 %{buildroot}%{_localstatedir}/lib/%{name_root}/data |
129 |
guillomovitch |
1153655 |
# create writable app dir for appstore |
130 |
joequant |
1562464 |
install -d -m 755 %{buildroot}%{_localstatedir}/lib/%{name_root}/apps |
131 |
guillomovitch |
1153655 |
# create nextcloud sysconfdir |
132 |
joequant |
1562464 |
install -d -m 755 %{buildroot}%{_sysconfdir}/%{name_root} |
133 |
neoclust |
1036847 |
|
134 |
neoclust |
1671797 |
# install content |
135 |
|
|
for d in $(find . -mindepth 1 -maxdepth 1 -type d | grep -v config); do |
136 |
|
|
cp -a "$d" %{buildroot}%{_datadir}/%{name_root} |
137 |
|
|
done |
138 |
|
|
|
139 |
|
|
for f in {*.php,*.html,occ,robots.txt}; do |
140 |
|
|
install -p -m 644 "$f" %{buildroot}%{_datadir}/%{name_root} |
141 |
|
|
done |
142 |
|
|
|
143 |
guillomovitch |
1153655 |
# symlink config dir |
144 |
neoclust |
1671797 |
ln -sf %{_sysconfdir}/%{name_root} %{buildroot}%{_datadir}/%{name_root}/config |
145 |
neoclust |
1036847 |
|
146 |
guillomovitch |
1153655 |
# nextcloud looks for ca-bundle.crt in config dir |
147 |
joequant |
1562464 |
ln -sf %{_sysconfdir}/pki/tls/certs/ca-bundle.crt %{buildroot}%{_sysconfdir}/%{name_root}/ca-bundle.crt |
148 |
neoclust |
1036847 |
|
149 |
guillomovitch |
1153655 |
# set default config |
150 |
joequant |
1562464 |
install -p -m 644 %{SOURCE7} %{buildroot}%{_sysconfdir}/%{name_root}/config.php |
151 |
neoclust |
1036847 |
|
152 |
joequant |
1562464 |
install -D -m 644 %{SOURCE1} %{buildroot}%{webappconfdir}/%{name_root}.conf |
153 |
|
|
install -D -m 644 %{SOURCE2} %{buildroot}%{webappconfdir}/%{name_root}.inc |
154 |
|
|
install -D -m 644 %{SOURCE8} %{buildroot}%{_sysconfdir}/php-fpm.d/%{name_root}.conf |
155 |
neoclust |
1036847 |
|
156 |
joequant |
1562464 |
cat > %{buildroot}%{_datadir}/%{name_root}/.htaccess <<EOF |
157 |
guillomovitch |
1153655 |
# Version: %{version} |
158 |
|
|
EOF |
159 |
neoclust |
1036847 |
|
160 |
guillomovitch |
1153655 |
install -d -m 755 %{buildroot}%{_sysconfdir}/cron.d |
161 |
joequant |
1562464 |
cat > %{buildroot}%{_sysconfdir}/cron.d/%{name_root} <<EOF |
162 |
guillomovitch |
1153655 |
# Run cron from to execute task even when no user connected |
163 |
|
|
*/15 * * * * apache /usr/bin/php -f /usr/share/nextcloud/cron.php |
164 |
|
|
EOF |
165 |
neoclust |
1036847 |
|
166 |
neoclust |
1671797 |
|
167 |
|
|
%pre |
168 |
|
|
# on update from previous release, move data directory from |
169 |
|
|
# %{_localstatedir}/lib/%{name} to %{_localstatedir}/lib/%{name}/data |
170 |
|
|
if [ $1 -gt 1 ] ; then |
171 |
|
|
if [ -d %{_localstatedir}/lib/%{name_root}/ -a ! -d %{_localstatedir}/lib/%{name_root}/data ]; then |
172 |
|
|
mv %{_localstatedir}/lib/%{name_root} %{_localstatedir}/lib/%{name_root}.tmp |
173 |
|
|
mkdir %{_localstatedir}/lib/%{name_root} |
174 |
|
|
mv %{_localstatedir}/lib/%{name_root}.tmp %{_localstatedir}/lib/%{name_root}/data |
175 |
|
|
fi |
176 |
|
|
fi |
177 |
|
|
|
178 |
|
|
%post |
179 |
|
|
touch '%{_sysconfdir}/%{name}/CAN_INSTALL' |
180 |
|
|
/usr/bin/chown apache:apache '%{_sysconfdir}/%{name}/CAN_INSTALL' |
181 |
|
|
|
182 |
guillomovitch |
1153655 |
%files |
183 |
neoclust |
1671797 |
%doc AUTHORS config/config.sample.php |
184 |
|
|
|
185 |
joequant |
1562464 |
%dir %attr(-,apache,apache) %{_sysconfdir}/%{name_root} |
186 |
|
|
%config(noreplace) %attr(0600,apache,apache) %{_sysconfdir}/%{name_root}/config.php |
187 |
|
|
%{_sysconfdir}/%{name_root}/ca-bundle.crt |
188 |
neoclust |
1671797 |
|
189 |
joequant |
1562464 |
%{_datadir}/%{name_root} |
190 |
neoclust |
1045477 |
|
191 |
joequant |
1562464 |
%dir %attr(0755,apache,apache) %{_localstatedir}/lib/%{name_root} |
192 |
|
|
%dir %attr(0755,apache,apache) %{_localstatedir}/lib/%{name_root}/apps |
193 |
|
|
%dir %attr(0750,apache,apache) %{_localstatedir}/lib/%{name_root}/data |
194 |
neoclust |
1036847 |
|
195 |
guillomovitch |
1153655 |
%config(noreplace) %{webappconfdir}/nextcloud.conf |
196 |
|
|
%config(noreplace) %{webappconfdir}/nextcloud.inc |
197 |
joequant |
1562464 |
%config(noreplace) %{_sysconfdir}/cron.d/%{name_root} |
198 |
|
|
%config(noreplace) %{_sysconfdir}/php-fpm.d/%{name_root}.conf |
199 |
neoclust |
1045479 |
|
200 |
guillomovitch |
1153655 |
%files mysql |
201 |
|
|
%doc README.mysql |
202 |
|
|
|
203 |
|
|
%files postgresql |
204 |
|
|
%doc README.postgresql |
205 |
|
|
|
206 |
|
|
%files sqlite |