/[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 1632546 - (show annotations) (download)
Wed Oct 7 08:29:44 2020 UTC (3 years, 6 months ago) by joequant
Original Path: cauldron/nextcloud/current/SPECS/nextcloud.spec
File size: 6888 byte(s)
update to 19.0.3

1 %define major_version 19
2 %define version %{major_version}.0.3
3 %define rel 1
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 Requires: php-webinterface >= 3:7.2.0
33 Requires: php-curl >= 3:7.2.0
34 Requires: php-dom >= 3:7.2.0
35 Requires: php-exif >= 3:7.2.0
36 Requires: php-fileinfo >= 3:7.2.0
37 Requires: php-gd >= 3:7.2.0
38 Requires: php-iconv >= 3:7.2.0
39 Requires: php-imagick
40 Recommends: php-intl >= 3:7.2.0
41 Requires: php-json >= 3:7.2.0
42 Requires: php-ldap >= 3:7.2.0
43 Requires: php-mbstring >= 3:7.2.0
44 Requires: php-openssl >= 3:7.2.0
45 Requires: php-pcre >= 3:7.2.0
46 Recommends: php-pcntl >= 3:7.2.0
47 Requires: php-pdo >= 3:7.2.0
48 Requires: php-session >= 3:7.2.0
49 Requires: php-simplexml >= 3:7.2.0
50 Requires: php-xmlwriter >= 3:7.2.0
51 Requires: php-zip >= 3:7.2.0
52 Requires: php-filter >= 3:7.2.0
53 Requires: %{name}-database = %{version}-%{release}
54 Requires: openssl >= 1.0.2f
55 Obsoletes: nextcloud17 <= 18.0.0.0
56 Obsoletes: nextcloud18 < %{version}
57 BuildArch: noarch
58
59 %description
60 A personal cloud server which runs on you personal server
61 and enables accessing your data from everywhere and sharing
62 with other people.
63
64 %package mysql
65 Summary: MySQL database support for NextCloud
66 Provides: %{name}-database = %{version}-%{release}
67 Requires: %{name} = %{version}-%{release}
68 # From getSupportedDatabases, mysql => pdo, mysql
69 Requires: php-pdo_mysql >= 3:7.2.0
70
71 %description mysql
72 This package ensures the necessary dependencies are in place for NextCloud to
73 work with MySQL / MariaDB databases. It does not require a MySQL / MariaDB
74 server to be installed, as you may well wish to use a remote database
75 server.
76 If you want the database to be on the same system as NextCloud itself, you must
77 also install and enable a MySQL / MariaDB server package. See README.mysql for
78 more details.
79
80 %package postgresql
81 Summary: PostgreSQL database support for NextCloud
82 Provides: %{name}-database = %{version}-%{release}
83 Requires: %{name} = %{version}-%{release}
84 # From getSupportedDatabases, pgsql => function, pg_connect
85 Requires: php-pdo_pgsql >= 3:7.2.0
86
87 %description postgresql
88 This package ensures the necessary dependencies are in place for NextCloud to
89 work with a PostgreSQL database. It does not require the PostgreSQL server
90 package to be installed, as you may well wish to use a remote database
91 server.
92 If you want the database to be on the same system as NextCloud itself, you must
93 also install and enable the PostgreSQL server package. See README.postgresql
94 for more details.
95
96 %package sqlite
97 Summary: SQLite 3 database support for NextCloud
98 Provides: %{name}-database = %{version}-%{release}
99 Requires: %{name} = %{version}-%{release}
100 # From getSupportedDatabases, pgsql => class, SQLite3
101 Requires: php-pdo_sqlite >= 3:7.2.0
102 Requires: php-pcre >= 3:7.2.0
103
104 %description sqlite
105 This package ensures the necessary dependencies are in place for NextCloud to
106 work with an SQLite 3 database stored on the local system.
107
108 %prep
109 %setup -q -n nextcloud
110 cp %{SOURCE4} README.mysql
111 cp %{SOURCE5} README.postgresql
112
113 # drop upstream update notification app
114 rm -rf apps/updatenotification
115 # also remove the actual updater
116 rm -rf updater
117
118 %install
119 install -d -m 755 %{buildroot}%{_datadir}/%{name_root}
120 # create nextcloud datadir
121 install -d -m 755 %{buildroot}%{_localstatedir}/lib/%{name_root}/data
122 # create writable app dir for appstore
123 install -d -m 755 %{buildroot}%{_localstatedir}/lib/%{name_root}/apps
124 # create nextcloud sysconfdir
125 install -d -m 755 %{buildroot}%{_sysconfdir}/%{name_root}
126
127 # install content
128 for d in $(find . -mindepth 1 -maxdepth 1 -type d | grep -v config); do
129 cp -a "$d" %{buildroot}%{_datadir}/%{name_root}
130 done
131
132 for f in {*.php,*.html,occ,robots.txt}; do
133 install -p -m 644 "$f" %{buildroot}%{_datadir}/%{name_root}
134 done
135
136 # symlink config dir
137 ln -sf %{_sysconfdir}/%{name_root} %{buildroot}%{_datadir}/%{name_root}/config
138
139 # nextcloud looks for ca-bundle.crt in config dir
140 ln -sf %{_sysconfdir}/pki/tls/certs/ca-bundle.crt %{buildroot}%{_sysconfdir}/%{name_root}/ca-bundle.crt
141
142 # set default config
143 install -p -m 644 %{SOURCE7} %{buildroot}%{_sysconfdir}/%{name_root}/config.php
144
145 install -D -m 644 %{SOURCE1} %{buildroot}%{webappconfdir}/%{name_root}.conf
146 install -D -m 644 %{SOURCE2} %{buildroot}%{webappconfdir}/%{name_root}.inc
147 install -D -m 644 %{SOURCE8} %{buildroot}%{_sysconfdir}/php-fpm.d/%{name_root}.conf
148
149 cat > %{buildroot}%{_datadir}/%{name_root}/.htaccess <<EOF
150 # Version: %{version}
151 EOF
152
153 install -d -m 755 %{buildroot}%{_sysconfdir}/cron.d
154 cat > %{buildroot}%{_sysconfdir}/cron.d/%{name_root} <<EOF
155 # Run cron from to execute task even when no user connected
156 */15 * * * * apache /usr/bin/php -f /usr/share/nextcloud/cron.php
157 EOF
158
159
160 %pre
161 # on update from previous release, move data directory from
162 # %{_localstatedir}/lib/%{name} to %{_localstatedir}/lib/%{name}/data
163 if [ $1 -gt 1 ] ; then
164 if [ -d %{_localstatedir}/lib/%{name_root}/ -a ! -d %{_localstatedir}/lib/%{name_root}/data ]; then
165 mv %{_localstatedir}/lib/%{name_root} %{_localstatedir}/lib/%{name_root}.tmp
166 mkdir %{_localstatedir}/lib/%{name_root}
167 mv %{_localstatedir}/lib/%{name_root}.tmp %{_localstatedir}/lib/%{name_root}/data
168 fi
169 fi
170
171
172 %files
173 %doc AUTHORS config/config.sample.php
174
175 %dir %attr(-,apache,apache) %{_sysconfdir}/%{name_root}
176 %config(noreplace) %attr(0600,apache,apache) %{_sysconfdir}/%{name_root}/config.php
177 %{_sysconfdir}/%{name_root}/ca-bundle.crt
178
179 %{_datadir}/%{name_root}
180
181 %dir %attr(0755,apache,apache) %{_localstatedir}/lib/%{name_root}
182 %dir %attr(0755,apache,apache) %{_localstatedir}/lib/%{name_root}/apps
183 %dir %attr(0750,apache,apache) %{_localstatedir}/lib/%{name_root}/data
184
185 %config(noreplace) %{webappconfdir}/nextcloud.conf
186 %config(noreplace) %{webappconfdir}/nextcloud.inc
187 %config(noreplace) %{_sysconfdir}/cron.d/%{name_root}
188 %config(noreplace) %{_sysconfdir}/php-fpm.d/%{name_root}.conf
189
190 %files mysql
191 %doc README.mysql
192
193 %files postgresql
194 %doc README.postgresql
195
196 %files sqlite

  ViewVC Help
Powered by ViewVC 1.1.30