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

  ViewVC Help
Powered by ViewVC 1.1.30