/[smecontribs]/rpms/nextcloud/contribs10/nextcloud.spec
ViewVC logotype

Annotation of /rpms/nextcloud/contribs10/nextcloud.spec

Parent Directory Parent Directory | Revision Log Revision Log | View Revision Graph Revision Graph


Revision 1.2 - (hide annotations) (download)
Sun Nov 8 23:00:09 2020 UTC (3 years, 11 months ago) by jpp
Branch: MAIN
Changes since 1.1: +16 -12 lines
* Sun Nov 08 2020 Jean-Philipe Pialasse <tests@pialasse.com> 17.0.1-2.sme
- first import in SME10 [SME: 11086]
- update to release 20.0.1

1 jpp 1.2 %define version 20.0.1
2 jpp 1.1 %define release 1
3    
4     %define apache_serverroot /usr/share
5     %define apache_confdir /etc/httpd/conf.d
6     %define nc_dir %{apache_serverroot}/nextcloud
7     %define nc_config_dir %{nc_dir}/config
8     %define nc_data_dir %{nc_dir}/data
9    
10     %define nc_user www
11     %define nc_group www
12    
13     # Turn off the brp-python-bytecompile script
14     %global __os_install_post %(echo '%{__os_install_post}' | sed -e 's!/usr/lib[^[:space:]]*/brp-python-bytecompile[[:space:]].*$!!g')
15    
16    
17     Summary: Nextcloud package
18     Name: nextcloud
19     Version: %{version}
20     Release: %{release}%{?dist}
21     License: GPL
22     Source: https://download.nextcloud.com/server/releases/nextcloud-%{version}.tar.bz2
23     Source1: nextcloud.conf
24     BuildArch: noarch
25     URL: https://nextcloud.com/
26    
27     BuildRequires: httpd
28    
29     Requires: httpd
30     # Required php packages
31 jpp 1.2 Requires: php74
32     Requires: php74-php-fpm
33     Requires: php74-php-gd
34     Requires: php74-php-pdo
35     Requires: php74-php-mbstring
36     Requires: php74-php-pecl-zip
37     Requires: php74-php-imagick
38 jpp 1.1
39     # Recommended php packages
40 jpp 1.2 Requires: php74-php-intl
41     Requires: php74-php-mcrypt
42 jpp 1.1
43     # Required php packages for specific apps
44 jpp 1.2 Requires: php74-php-ldap
45 jpp 1.1
46     # Required php packages for MariaDB
47 jpp 1.2 Requires: php74-php-mysqlnd
48 jpp 1.1 #rh-php71-php-pdo_mysql
49    
50     # Conflicts: nextcloud < 15
51    
52     %description
53     Nextcloud files and configuration.
54    
55     This package installs as follows:
56     nc_dir: %{nc_dir}
57     nc_data_dir: %{nc_data_dir}
58     nc_config_dir: %{nc_config_dir}
59    
60     %pre
61     # true if $1 is greater than or equal $2
62     verlte() {
63     [ "$1" = "`echo -e "$1\n$2" | sort -V | head -n1`" ]
64     }
65    
66     verlt() {
67     [ "$1" = "$2" ] && return 1 || verlte $1 $2
68     }
69     # if there is already an installed version
70     if [ -f /usr/share/nextcloud/version.php ]
71     then
72     echo "version.php found, already installed"
73     # get version number
74     installedver=`php -r 'require("/usr/share/nextcloud/version.php"); print "$OC_VersionString";'`;
75     majvers=`echo %{version} | cut -d. -f1`
76     majcurvers=`echo $installedver | cut -d. -f1`
77     # we should fail with exit 1 if
78     # installed version > rpm version
79     if ( verlte %{version} $installedver )
80     then
81     echo "Installed version has $installedver been upgraded and is most recent than this rpm %{version} version"
82     # echo "backup current install to /usr/share/nextcloud_back"
83     # mkdir /usr/share/nextcloud_back
84     # rsync -ar /usr/share/nextcloud/ /usr/share/nextcloud_back
85     exit 1
86     elif [ $(($majvers-1)) -gt $majcurvers ]
87     then # installed version < rpm version -1
88     echo "can not upgrade from $installedver to %{version}, please do a manual or web update with intermediate version"
89     # echo "backup current install to /usr/share/nextcloud_back"
90     # mkdir /usr/share/nextcloud_back
91     # rsync -ar /usr/share/nextcloud/ /usr/share/nextcloud_back
92     exit 1
93     fi
94     fi
95    
96     %postun
97     # true if $1 is greater than or equal $2
98     verlte() {
99     [ "$1" = "`echo -e "$1\n$2" | sort -V | head -n1`" ]
100     }
101    
102     verlt() {
103     [ "$1" = "$2" ] && return 1 || verlte $1 $2
104     }
105    
106     if [ $1 == 1 ]; then
107     # if there is already an installed version
108     if [ -f /usr/share/nextcloud/version.php ]
109     then
110     # echo "version.php found, already installed"
111     # get version number
112     installedver=`php -r 'require("/usr/share/nextcloud/version.php"); print "$OC_VersionString";'`;
113     majvers=`echo %{version} | cut -d. -f1`
114     majcurvers=`echo $installedver | cut -d. -f1`
115     # echo "and the version is $installedver"
116     # we should fail with exit 1 if
117     # installed version > rpm version
118     if ( verlte %{version} $installedver )
119     then
120     # echo "reverting content"
121     # rsync -ar /usr/share/nextcloud_back/ /usr/share/nextcloud_back
122     # rm -rf /usr/share/nextcloud_back
123     exit 0
124     elif [ $(($majvers-1)) -gt $majcurvers ]
125     then # installed version < rpm version -1
126     # echo "reverting content"
127     # rsync -ar /usr/share/nextcloud_back/ /usr/share/nextcloud_back
128     # rm -rf /usr/share/nextcloud_back
129     exit 0
130     fi
131     fi
132     fi
133    
134     %install
135     rm -rf %{buildroot}
136     mkdir -p %{buildroot}/%{nc_data_dir}
137     mkdir -p %{buildroot}/usr/share
138     tar xf %{SOURCE0} -C %{buildroot}/usr/share
139    
140     mkdir -p %{buildroot}/%{nc_dir}
141     mkdir -p %{buildroot}/%{nc_dir}/etc
142     mkdir -p %{buildroot}/%{nc_data_dir}
143     mkdir -p %{buildroot}/%{nc_config_dir}
144     # mkdir -p %{buildroot}/%{nc_dir}/assets
145     mkdir -p %{buildroot}/%{nc_dir}/updater
146    
147     mkdir -p %{buildroot}/etc/httpd/conf.d
148     cp %{SOURCE1} %{buildroot}/etc/httpd/conf.d
149    
150    
151     %files
152     %defattr(0640,root,%{nc_group},0750)
153     %dir %attr(0775,root,%{nc_group}) %{nc_dir}
154     %attr(0755,%{nc_user},%{nc_group}) %{nc_dir}/occ
155     %attr(0750,%{nc_user},%{nc_group}) %{nc_dir}/apps
156     # %attr(0750,%{nc_user},%{nc_group}) %{nc_dir}/assets
157     %attr(0750,%{nc_user},%{nc_group}) %{nc_dir}/updater
158     %attr(0775,%{nc_user},%{nc_group}) %{nc_data_dir}
159     %attr(0775,%{nc_user},%{nc_group}) %{nc_config_dir}
160     %attr(0755,%{nc_user},%{nc_group}) %{nc_dir}/lib
161     %attr(0755,%{nc_user},%{nc_group}) %{nc_dir}/ocm-provider
162     %attr(0755,%{nc_user},%{nc_group}) %{nc_dir}/core
163     %attr(0755,%{nc_user},%{nc_group}) %{nc_dir}/settings
164     %attr(0755,%{nc_user},%{nc_group}) %{nc_dir}/3rdparty
165     %attr(0755,%{nc_user},%{nc_group}) %{nc_dir}/resources
166     %attr(0755,%{nc_user},%{nc_group}) %{nc_dir}/themes
167     %attr(0755,%{nc_user},%{nc_group}) %{nc_dir}/ocs*
168     %attr(0755,%{nc_user},%{nc_group}) %{nc_dir}/*.php
169     %attr(0755,%{nc_user},%{nc_group}) %{nc_dir}/AUTHORS
170     %attr(0755,%{nc_user},%{nc_group}) %{nc_dir}/COPYING
171     %attr(0755,%{nc_user},%{nc_group}) %{nc_dir}/index.html
172     %attr(0755,%{nc_user},%{nc_group}) %{nc_dir}/robots.txt
173     %attr(0644,%{nc_user},%{nc_group}) %{nc_dir}/.htaccess
174    
175     %config(noreplace) %attr(0644,%{nc_user},%{nc_group}) %{nc_dir}/.user.ini
176     %config(noreplace) %attr(0644,root,root) /etc/httpd/conf.d/nextcloud.conf
177    
178     %defattr(0644,%{nc_user},%{nc_group},0755)
179    
180    
181     %changelog
182 jpp 1.2 * Sun Nov 08 2020 Jean-Philipe Pialasse <tests@pialasse.com> 17.0.1-2.sme
183     - first import in SME10 [SME: 11086]
184     - update to release 20.0.1
185    
186 jpp 1.1 * Sun Dec 15 2019 Jean-Philipe Pialasse <tests@pialasse.com> 17.0.1-1.sme
187     - update to release 17.0.1
188    
189     * Sun Sep 08 2019 Jean-Philipe Pialasse <tests@pialasse.com> 16.0.4-1.sme
190     - Update to release 16.0.4 [SME: 10803]
191    
192     * Wed Mar 06 2019 Jean-Philipe Pialasse <tests@pialasse.com> 15.0.0-6.sme
193     - fix typo in postun script [SME: 10747]
194    
195     * Tue Jan 08 2019 Jean-Philipe Pialasse <tests@pialasse.com> 15.0.0-5.sme
196     - remove conflicts nextcloud <15 to allow people to use the rpm update if they are
197     with manual updated version 14 with rpm version 13 [SME: 10696]
198    
199     * Mon Jan 07 2019 Jean-Philipe Pialasse <tests@pialasse.com> 15.0.0-4.sme
200     - prevent rpm to upgrade if webupdate has been used [SME: 10670]
201     and rpm version is < to on disk version
202     or if rppm version is more than one major release greater
203    
204     * Fri Dec 21 2018 Jean-Philipe Pialasse <tests@pialasse.com> 15.0.0-3.sme
205     - Update to release 15.0.0 [SME: 10669]
206    
207     * Wed Dec 19 2018 Jean-Philipe Pialasse <tests@pialasse.com> 13.0.1-5.sme
208     - fix failure to update [SME: 10596]
209     remove assets folder before 13.0.4 update
210    
211     * Sat Apr 07 2018 Jean-Philipe Pialasse <tests@pialasse.com> 13.0.1-4.sme
212     - missing dependency for php71-php-pecl-zip [SME: 10554]
213    
214     * Wed Mar 28 2018 Jean-Philipe Pialasse <tests@pialasse.com> 13.0.1-3.sme
215     - import for SME9 using remi scl
216    
217     * Mon Mar 19 2018 Giacomo Sanchietti <giacomo.sanchietti@nethesis.it> - 13.0.1-1
218     - Update to release 13.0.1
219    
220     * Tue Mar 06 2018 Giacomo Sanchietti <giacomo.sanchietti@nethesis.it> - 13.0.0-1
221     - Update to release 13.0.0
222    
223     * Thu Jan 25 2018 Alessandro Polidori <alessandro.polidori@nethesis.it> - 12.0.5-1
224     - Update to release 12.0.5
225    
226     * Mon Jan 15 2018 Alessandro Polidori <alessandro.polidori@nethesis.it> - 12.0.4-2
227     - Spec: remove "config" sign from .htaccess
228    
229     * Thu Dec 14 2017 Giacomo Sanchietti <giacomo.sanchietti@nethesis.it> - 12.0.4-1
230     - Update to release 12.0.4
231    
232     * Wed Sep 27 2017 Giacomo Sanchietti <giacomo.sanchietti@nethesis.it> - 12.0.3
233     - Update to release 12.0.3
234    
235     * Tue Aug 29 2017 Giacomo Sanchietti <giacomo.sanchietti@nethesis.it> - 12.0.2-2
236     - Avoid security warnings on python compiled files
237    
238     * Wed Aug 23 2017 Giacomo Sanchietti <giacomo.sanchietti@nethesis.it> - 12.0.2
239     - Update to release 12.0.2
240    
241     * Wed May 24 2017 Giacomo Sanchietti <giacomo.sanchietti@nethesis.it> - 12.0.0
242     - Update to release 12.0.0
243     - Fix spec warnings - Thanks to @mbevc1
244    
245     * Wed May 17 2017 Giacomo Sanchietti <giacomo.sanchietti@nethesis.it> - 11.0.3-2
246     - Fix WebDAV authentication - Thanks to Davide Principi
247    
248     * Wed May 17 2017 Giacomo Sanchietti <giacomo.sanchietti@nethesis.it> - 11.0.3
249     - Update to release 11.0.3
250    
251     * Wed Mar 15 2017 Giacomo Sanchietti <giacomo.sanchietti@nethesis.it> - 11.0.2
252     - Update to release 11.0.2
253     - Move installation inside /usr/share/nextcloud
254     - Switch to php-fpm
255    
256     * Thu Dec 15 2016 Giacomo Sanchietti <giacomo.sanchietti@nethesis.it> - 10.0.2
257     - Bump release: 10.0.2
258    
259     * Mon Aug 01 2016 Giacomo Sanchietti <giacomo.sanchietti@nethesis.it> - 9.0.53-2
260     - First Nextcloud release - NethServer/dev#5055
261    

admin@koozali.org
ViewVC Help
Powered by ViewVC 1.2.1 RSS 2.0 feed