/[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 1642839 - (show annotations) (download)
Thu Nov 5 15:21:04 2020 UTC (3 years, 5 months ago) by joequant
Original Path: cauldron/nextcloud/current/SPECS/nextcloud.spec
File size: 7004 byte(s)
update to 20.0.1

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

  ViewVC Help
Powered by ViewVC 1.1.30