/[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 1328655 - (hide annotations) (download)
Tue Nov 6 10:22:17 2018 UTC (5 years, 4 months ago) by kekepower
Original Path: cauldron/nextcloud/current/SPECS/nextcloud.spec
File size: 6731 byte(s)
- Update to version 13.0.7

1 kekepower 1328655 %define version 13.0.7
2     %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     # 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 zezinho 1184611 Recommends: php-pcntl
49 guillomovitch 1153655 Requires: php-pdo
50     Requires: php-session
51     Requires: php-simplexml
52     Requires: php-xmlwriter
53     Requires: php-zip
54     Requires: php-filter
55     Requires: %{name}-database = %{version}-%{release}
56 neoclust 1036847 BuildArch: noarch
57    
58     %description
59     A personal cloud server which runs on you personal server
60     and enables accessing your data from everywhere and sharing
61     with other people.
62    
63 guillomovitch 1153655 %package mysql
64     Summary: MySQL database support for NextCloud
65     Provides: %{name}-database = %{version}-%{release}
66     Requires: %{name} = %{version}-%{release}
67     # From getSupportedDatabases, mysql => pdo, mysql
68     Requires: php-pdo_mysql
69    
70     %description mysql
71     This package ensures the necessary dependencies are in place for NextCloud to
72     work with MySQL / MariaDB databases. It does not require a MySQL / MariaDB
73     server to be installed, as you may well wish to use a remote database
74     server.
75     If you want the database to be on the same system as NextCloud itself, you must
76     also install and enable a MySQL / MariaDB server package. See README.mysql for
77     more details.
78    
79     %package postgresql
80     Summary: PostgreSQL database support for NextCloud
81     Provides: %{name}-database = %{version}-%{release}
82     Requires: %{name} = %{version}-%{release}
83     # From getSupportedDatabases, pgsql => function, pg_connect
84 zezinho 1222889 Requires: php-pdo_pgsql
85 guillomovitch 1153655
86     %description postgresql
87     This package ensures the necessary dependencies are in place for NextCloud to
88     work with a PostgreSQL database. It does not require the PostgreSQL server
89     package to be installed, as you may well wish to use a remote database
90     server.
91     If you want the database to be on the same system as NextCloud itself, you must
92     also install and enable the PostgreSQL server package. See README.postgresql
93     for more details.
94    
95     %package sqlite
96     Summary: SQLite 3 database support for NextCloud
97     Provides: %{name}-database = %{version}-%{release}
98     Requires: %{name} = %{version}-%{release}
99     # From getSupportedDatabases, pgsql => class, SQLite3
100 zezinho 1222889 Requires: php-pdo_sqlite php-pcre
101 guillomovitch 1153655
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 neoclust 1036847 %prep
107     %setup -q -n %{name}
108 guillomovitch 1153655 %autopatch -p 1
109     cp %{SOURCE4} README.mysql
110     cp %{SOURCE5} README.postgresql
111 neoclust 1036847
112 guillomovitch 1153655 # drop upstream update notification app
113     rm -rf apps/updatenotification
114     # also remove the actual updater
115     rm -rf updater
116    
117 neoclust 1036847 %install
118 guillomovitch 1153655 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 neoclust 1036847
126 guillomovitch 1153655 # 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 neoclust 1036847
131 neoclust 1190552 for f in {*.php,*.html,occ,robots.txt}; do
132 guillomovitch 1153655 install -p -m 644 "$f" %{buildroot}%{_datadir}/%{name}
133     done
134 neoclust 1036847
135 guillomovitch 1153655 # symlink config dir
136     ln -sf %{_sysconfdir}/%{name} %{buildroot}%{_datadir}/%{name}/config
137 neoclust 1036847
138 guillomovitch 1153655 # 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 neoclust 1036847
141 guillomovitch 1153655 # set default config
142     install -p -m 644 %{SOURCE7} %{buildroot}%{_sysconfdir}/%{name}/config.php
143 neoclust 1036847
144 guillomovitch 1153655 install -D -m 644 %{SOURCE1} %{buildroot}%{webappconfdir}/%{name}.conf
145     install -D -m 644 %{SOURCE2} %{buildroot}%{webappconfdir}/%{name}.inc
146 neoclust 1036847
147 guillomovitch 1153655 cat > %{buildroot}%{_datadir}/%{name}/.htaccess <<EOF
148     # Version: %{version}
149     EOF
150 neoclust 1036847
151 guillomovitch 1153655 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 neoclust 1036847
157 zezinho 1184605 cat > README.urpmi <<EOF
158     Upgrade information
159    
160     Starting with Nextcloud version 12, the config file changes a lot.
161     When upgrading from a previous version, you will have to edit by yourself
162     the config file using /etc/nextcloud/config.php.rpmnew as reference.
163     EOF
164    
165    
166 guillomovitch 1153655 %pre
167     # on update from previous release, move data directory from
168     # %{_localstatedir}/lib/%{name} to %{_localstatedir}/lib/%{name}/data
169     if [ $1 -gt 1 ] ; then
170     if [ -d %{_localstatedir}/lib/%{name}/ -a ! -d %{_localstatedir}/lib/%{name}/data ]; then
171     mv %{_localstatedir}/lib/%{name} %{_localstatedir}/lib/%{name}.tmp
172     mkdir %{_localstatedir}/lib/%{name}
173     mv %{_localstatedir}/lib/%{name}.tmp %{_localstatedir}/lib/%{name}/data
174     fi
175     fi
176 neoclust 1036847
177 zezinho 1184602
178 guillomovitch 1153655 %files
179 zezinho 1184602 %doc AUTHORS config/config.sample.php README.urpmi
180 neoclust 1036847
181 guillomovitch 1153655 %dir %attr(-,apache,apache) %{_sysconfdir}/%{name}
182     %config(noreplace) %attr(0600,apache,apache) %{_sysconfdir}/%{name}/config.php
183     %{_sysconfdir}/%{name}/ca-bundle.crt
184 neoclust 1036847
185 guillomovitch 1153655 %{_datadir}/%{name}
186 neoclust 1045477
187 guillomovitch 1153655 %dir %attr(0755,apache,apache) %{_localstatedir}/lib/%{name}
188     %dir %attr(0755,apache,apache) %{_localstatedir}/lib/%{name}/apps
189     %dir %attr(0750,apache,apache) %{_localstatedir}/lib/%{name}/data
190 neoclust 1036847
191 guillomovitch 1153655 %config(noreplace) %{webappconfdir}/nextcloud.conf
192     %config(noreplace) %{webappconfdir}/nextcloud.inc
193     %config(noreplace) %{_sysconfdir}/cron.d/%{name}
194 neoclust 1045479
195 guillomovitch 1153655 %files mysql
196     %doc README.mysql
197    
198     %files postgresql
199     %doc README.postgresql
200    
201     %files sqlite

  ViewVC Help
Powered by ViewVC 1.1.30