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