/[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 1159915 - (hide annotations) (download)
Tue Sep 26 08:28:08 2017 UTC (6 years, 6 months ago) by guillomovitch
Original Path: cauldron/nextcloud/current/SPECS/nextcloud.spec
File size: 6429 byte(s)
new version 12.0.3
1 guillomovitch 1159915 %define version 12.0.3
2 luigiwalser 1078936 %define rel 1
3 neoclust 1036847 %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 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     # Stop OC from trying to do stuff to .htaccess files. Just calm down, OC.
30     # Distributors are on the case.
31     Patch1: %{name}-12.0.2-dont_update_htacess.patch
32     # Disable the integrity checking whilst a better way to deal with it is found
33     Patch5: %{name}-9.1.0-default_integrity_check_disabled.patch
34     # Direct the admin to the correct cli command for upgrades
35     Patch9: %{name}-12.0.2-correct-cli-upgrade.patch
36 neoclust 1036847 Requires: apache-mod_php
37 guillomovitch 1153655 Requires: php-curl
38     Requires: php-dom
39     Requires: php-exif
40     Requires: php-fileinfo
41 neoclust 1036847 Requires: php-gd
42     Requires: php-iconv
43 guillomovitch 1153655 Requires: php-json
44     Requires: php-ldap
45     Requires: php-mbstring
46     Requires: php-openssl
47     Requires: php-pcre
48     Requires: php-pdo
49     Requires: php-session
50     Requires: php-simplexml
51     Requires: php-xmlwriter
52     Requires: php-zip
53     Requires: php-filter
54     Requires: %{name}-database = %{version}-%{release}
55 neoclust 1036847 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 guillomovitch 1153655 %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
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-pgsql
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-sqlite3 php-pcre
100    
101     %description sqlite
102     This package ensures the necessary dependencies are in place for NextCloud to
103     work with an SQLite 3 database stored on the local system.
104    
105 neoclust 1036847 %prep
106     %setup -q -n %{name}
107 guillomovitch 1153655 %autopatch -p 1
108     cp %{SOURCE4} README.mysql
109     cp %{SOURCE5} README.postgresql
110 neoclust 1036847
111 guillomovitch 1153655 # drop upstream update notification app
112     rm -rf apps/updatenotification
113     # also remove the actual updater
114     rm -rf updater
115    
116 neoclust 1036847 %install
117 guillomovitch 1153655 install -d -m 755 %{buildroot}%{_datadir}/%{name}
118     # create nextcloud datadir
119     install -d -m 755 %{buildroot}%{_localstatedir}/lib/%{name}/data
120     # create writable app dir for appstore
121     install -d -m 755 %{buildroot}%{_localstatedir}/lib/%{name}/apps
122     # create nextcloud sysconfdir
123     install -d -m 755 %{buildroot}%{_sysconfdir}/%{name}
124 neoclust 1036847
125 guillomovitch 1153655 # install content
126     for d in $(find . -mindepth 1 -maxdepth 1 -type d | grep -v config); do
127     cp -a "$d" %{buildroot}%{_datadir}/%{name}
128     done
129 neoclust 1036847
130 guillomovitch 1153655 for f in {*.php,*.xml,*.html,occ,robots.txt}; do
131     install -p -m 644 "$f" %{buildroot}%{_datadir}/%{name}
132     done
133 neoclust 1036847
134 guillomovitch 1153655 # symlink config dir
135     ln -sf %{_sysconfdir}/%{name} %{buildroot}%{_datadir}/%{name}/config
136 neoclust 1036847
137 guillomovitch 1153655 # nextcloud looks for ca-bundle.crt in config dir
138     ln -sf %{_sysconfdir}/pki/tls/certs/ca-bundle.crt %{buildroot}%{_sysconfdir}/%{name}/ca-bundle.crt
139 neoclust 1036847
140 guillomovitch 1153655 # set default config
141     install -p -m 644 %{SOURCE7} %{buildroot}%{_sysconfdir}/%{name}/config.php
142 neoclust 1036847
143 guillomovitch 1153655 install -D -m 644 %{SOURCE1} %{buildroot}%{webappconfdir}/%{name}.conf
144     install -D -m 644 %{SOURCE2} %{buildroot}%{webappconfdir}/%{name}.inc
145 neoclust 1036847
146 guillomovitch 1153655 cat > %{buildroot}%{_datadir}/%{name}/.htaccess <<EOF
147     # Version: %{version}
148     EOF
149 neoclust 1036847
150 guillomovitch 1153655 install -d -m 755 %{buildroot}%{_sysconfdir}/cron.d
151     cat > %{buildroot}%{_sysconfdir}/cron.d/%{name} <<EOF
152     # Run cron from to execute task even when no user connected
153     */15 * * * * apache /usr/bin/php -f /usr/share/nextcloud/cron.php
154     EOF
155 neoclust 1036847
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 guillomovitch 1153655 %files
168     %doc AUTHORS config/config.sample.php
169 neoclust 1036847
170 guillomovitch 1153655 %dir %attr(-,apache,apache) %{_sysconfdir}/%{name}
171     %config(noreplace) %attr(0600,apache,apache) %{_sysconfdir}/%{name}/config.php
172     %{_sysconfdir}/%{name}/ca-bundle.crt
173 neoclust 1036847
174 guillomovitch 1153655 %{_datadir}/%{name}
175 neoclust 1045477
176 guillomovitch 1153655 %dir %attr(0755,apache,apache) %{_localstatedir}/lib/%{name}
177     %dir %attr(0755,apache,apache) %{_localstatedir}/lib/%{name}/apps
178     %dir %attr(0750,apache,apache) %{_localstatedir}/lib/%{name}/data
179 neoclust 1036847
180 guillomovitch 1153655 %config(noreplace) %{webappconfdir}/nextcloud.conf
181     %config(noreplace) %{webappconfdir}/nextcloud.inc
182     %config(noreplace) %{_sysconfdir}/cron.d/%{name}
183 neoclust 1045479
184 guillomovitch 1153655 %files mysql
185     %doc README.mysql
186    
187     %files postgresql
188     %doc README.postgresql
189    
190     %files sqlite

  ViewVC Help
Powered by ViewVC 1.1.30