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

Contents of /rpms/nextcloud/contribs9/nextcloud.spec

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


Revision 1.8 - (show annotations) (download)
Tue Jan 8 02:49:07 2019 UTC (5 years, 10 months ago) by jpp
Branch: MAIN
Changes since 1.7: +38 -1 lines
* Mon Jan 07 2019 Jean-Philipe Pialasse <tests@pialasse.com> 15.0.0-4.sme
- prevent rpm to upgrade if webupdate has been used [SME: 10670]
  and rpm version is < to on disk version
  or if rppm version is more than one major release greater

1 %define version 15.0.0
2 %define release 4
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 Requires: php71
32 Requires: php71-php-fpm
33 Requires: php71-php-gd
34 Requires: php71-php-pdo
35 Requires: php71-php-mbstring
36 Requires: php71-php-pecl-zip
37 Requires: php71-php-imagick
38
39 # Recommended php packages
40 Requires: php71-php-intl
41 Requires: php71-php-mcrypt
42
43 # Required php packages for specific apps
44 Requires: php71-php-ldap
45
46 # Required php packages for MariaDB
47 Requires: php71-php-mysqlnd
48 #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 echo "and the version is $installedver"
78 # we should fail with exit 1 if
79 # installed version > rpm version
80 if ( verlte $installedver %{version} )
81 then
82 echo "Installed version has been upgraded and is most recent than this rpm"
83 exit 1
84 elif [ $(($majvers-1)) > $majcurvers  ]
85 then # installed version < rpm version -1
86 echo "can not upgrade from $installedver to %{version}, please do a manual update with intermediate version"
87 exit 1
88 fi
89 fi
90
91
92 %install
93 rm -rf %{buildroot}
94 mkdir -p %{buildroot}/%{nc_data_dir}
95 mkdir -p %{buildroot}/usr/share
96 tar xf %{SOURCE0} -C %{buildroot}/usr/share
97
98 mkdir -p %{buildroot}/%{nc_dir}
99 mkdir -p %{buildroot}/%{nc_dir}/etc
100 mkdir -p %{buildroot}/%{nc_data_dir}
101 mkdir -p %{buildroot}/%{nc_config_dir}
102 # mkdir -p %{buildroot}/%{nc_dir}/assets
103 mkdir -p %{buildroot}/%{nc_dir}/updater
104
105 mkdir -p %{buildroot}/etc/httpd/conf.d
106 cp %{SOURCE1} %{buildroot}/etc/httpd/conf.d
107
108
109 %files
110 %defattr(0640,root,%{nc_group},0750)
111 %dir %attr(0775,root,%{nc_group}) %{nc_dir}
112 %attr(0755,%{nc_user},%{nc_group}) %{nc_dir}/occ
113 %attr(0750,%{nc_user},%{nc_group}) %{nc_dir}/apps
114 # %attr(0750,%{nc_user},%{nc_group}) %{nc_dir}/assets
115 %attr(0750,%{nc_user},%{nc_group}) %{nc_dir}/updater
116 %attr(0775,%{nc_user},%{nc_group}) %{nc_data_dir}
117 %attr(0775,%{nc_user},%{nc_group}) %{nc_config_dir}
118 %attr(0755,%{nc_user},%{nc_group}) %{nc_dir}/lib
119 %attr(0755,%{nc_user},%{nc_group}) %{nc_dir}/ocm-provider
120 %attr(0755,%{nc_user},%{nc_group}) %{nc_dir}/core
121 %attr(0755,%{nc_user},%{nc_group}) %{nc_dir}/settings
122 %attr(0755,%{nc_user},%{nc_group}) %{nc_dir}/3rdparty
123 %attr(0755,%{nc_user},%{nc_group}) %{nc_dir}/resources
124 %attr(0755,%{nc_user},%{nc_group}) %{nc_dir}/themes
125 %attr(0755,%{nc_user},%{nc_group}) %{nc_dir}/ocs*
126 %attr(0755,%{nc_user},%{nc_group}) %{nc_dir}/*.php
127 %attr(0755,%{nc_user},%{nc_group}) %{nc_dir}/AUTHORS
128 %attr(0755,%{nc_user},%{nc_group}) %{nc_dir}/COPYING
129 %attr(0755,%{nc_user},%{nc_group}) %{nc_dir}/index.html
130 %attr(0755,%{nc_user},%{nc_group}) %{nc_dir}/robots.txt
131 %attr(0644,%{nc_user},%{nc_group}) %{nc_dir}/.htaccess
132
133 %config(noreplace) %attr(0644,%{nc_user},%{nc_group}) %{nc_dir}/.user.ini
134 %config(noreplace) %attr(0644,root,root) /etc/httpd/conf.d/nextcloud.conf
135
136 %defattr(0644,%{nc_user},%{nc_group},0755)
137
138
139 %changelog
140 * Mon Jan 07 2019 Jean-Philipe Pialasse <tests@pialasse.com> 15.0.0-4.sme
141 - prevent rpm to upgrade if webupdate has been used [SME: 10670]
142 and rpm version is < to on disk version
143 or if rppm version is more than one major release greater
144
145 * Fri Dec 21 2018 Jean-Philipe Pialasse <tests@pialasse.com> 15.0.0-3.sme
146 - Update to release 15.0.0 [SME: 10669]
147
148 * Wed Dec 19 2018 Jean-Philipe Pialasse <tests@pialasse.com> 13.0.1-5.sme
149 - fix failure to update [SME: 10596]
150 remove assets folder before 13.0.4 update
151
152 * Sat Apr 07 2018 Jean-Philipe Pialasse <tests@pialasse.com> 13.0.1-4.sme
153 - missing dependency for php71-php-pecl-zip [SME: 10554]
154
155 * Wed Mar 28 2018 Jean-Philipe Pialasse <tests@pialasse.com> 13.0.1-3.sme
156 - import for SME9 using remi scl
157
158 * Mon Mar 19 2018 Giacomo Sanchietti <giacomo.sanchietti@nethesis.it> - 13.0.1-1
159 - Update to release 13.0.1
160
161 * Tue Mar 06 2018 Giacomo Sanchietti <giacomo.sanchietti@nethesis.it> - 13.0.0-1
162 - Update to release 13.0.0
163
164 * Thu Jan 25 2018 Alessandro Polidori <alessandro.polidori@nethesis.it> - 12.0.5-1
165 - Update to release 12.0.5
166
167 * Mon Jan 15 2018 Alessandro Polidori <alessandro.polidori@nethesis.it> - 12.0.4-2
168 - Spec: remove "config" sign from .htaccess
169
170 * Thu Dec 14 2017 Giacomo Sanchietti <giacomo.sanchietti@nethesis.it> - 12.0.4-1
171 - Update to release 12.0.4
172
173 * Wed Sep 27 2017 Giacomo Sanchietti <giacomo.sanchietti@nethesis.it> - 12.0.3
174 - Update to release 12.0.3
175
176 * Tue Aug 29 2017 Giacomo Sanchietti <giacomo.sanchietti@nethesis.it> - 12.0.2-2
177 - Avoid security warnings on python compiled files
178
179 * Wed Aug 23 2017 Giacomo Sanchietti <giacomo.sanchietti@nethesis.it> - 12.0.2
180 - Update to release 12.0.2
181
182 * Wed May 24 2017 Giacomo Sanchietti <giacomo.sanchietti@nethesis.it> - 12.0.0
183 - Update to release 12.0.0
184 - Fix spec warnings - Thanks to @mbevc1
185
186 * Wed May 17 2017 Giacomo Sanchietti <giacomo.sanchietti@nethesis.it> - 11.0.3-2
187 - Fix WebDAV authentication - Thanks to Davide Principi
188
189 * Wed May 17 2017 Giacomo Sanchietti <giacomo.sanchietti@nethesis.it> - 11.0.3
190 - Update to release 11.0.3
191
192 * Wed Mar 15 2017 Giacomo Sanchietti <giacomo.sanchietti@nethesis.it> - 11.0.2
193 - Update to release 11.0.2
194 - Move installation inside /usr/share/nextcloud
195 - Switch to php-fpm
196
197 * Thu Dec 15 2016 Giacomo Sanchietti <giacomo.sanchietti@nethesis.it> - 10.0.2
198 - Bump release: 10.0.2
199
200 * Mon Aug 01 2016 Giacomo Sanchietti <giacomo.sanchietti@nethesis.it> - 9.0.53-2
201 - First Nextcloud release - NethServer/dev#5055
202

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