/[packages]/backports/8/nextcloud/current/SPECS/nextcloud.spec
ViewVC logotype

Annotation of /backports/8/nextcloud/current/SPECS/nextcloud.spec

Parent Directory Parent Directory | Revision Log Revision Log


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

  ViewVC Help
Powered by ViewVC 1.1.30