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

Diff of /rpms/nextcloud/contribs9/nextcloud.spec

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

Revision 1.6 by jpp, Fri Dec 21 03:15:09 2018 UTC Revision 1.8 by jpp, Tue Jan 8 02:49:07 2019 UTC
# Line 1  Line 1 
1  %define version 15.0.0  %define version 15.0.0
2  %define release 2  %define release 4
3    
4  %define apache_serverroot /usr/share  %define apache_serverroot /usr/share
5  %define apache_confdir /etc/httpd/conf.d  %define apache_confdir /etc/httpd/conf.d
# Line 47  Requires: php71-php-ldap Line 47  Requires: php71-php-ldap
47  Requires: php71-php-mysqlnd  Requires: php71-php-mysqlnd
48  #rh-php71-php-pdo_mysql  #rh-php71-php-pdo_mysql
49    
50    Conflicts: nextcloud < 15
51    
52  %description  %description
53  Nextcloud files and configuration.  Nextcloud files and configuration.
# Line 56  nc_dir:        %{nc_dir} Line 57  nc_dir:        %{nc_dir}
57  nc_data_dir:   %{nc_data_dir}  nc_data_dir:   %{nc_data_dir}
58  nc_config_dir: %{nc_config_dir}  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  %install
93  rm -rf %{buildroot}  rm -rf %{buildroot}
# Line 84  cp %{SOURCE1} %{buildroot}/etc/httpd/con Line 116  cp %{SOURCE1} %{buildroot}/etc/httpd/con
116  %attr(0775,%{nc_user},%{nc_group}) %{nc_data_dir}  %attr(0775,%{nc_user},%{nc_group}) %{nc_data_dir}
117  %attr(0775,%{nc_user},%{nc_group}) %{nc_config_dir}  %attr(0775,%{nc_user},%{nc_group}) %{nc_config_dir}
118  %attr(0755,%{nc_user},%{nc_group}) %{nc_dir}/lib  %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  %attr(0755,%{nc_user},%{nc_group}) %{nc_dir}/core
121  %attr(0755,%{nc_user},%{nc_group}) %{nc_dir}/settings  %attr(0755,%{nc_user},%{nc_group}) %{nc_dir}/settings
122  %attr(0755,%{nc_user},%{nc_group}) %{nc_dir}/3rdparty  %attr(0755,%{nc_user},%{nc_group}) %{nc_dir}/3rdparty
# Line 92  cp %{SOURCE1} %{buildroot}/etc/httpd/con Line 125  cp %{SOURCE1} %{buildroot}/etc/httpd/con
125  %attr(0755,%{nc_user},%{nc_group}) %{nc_dir}/ocs*  %attr(0755,%{nc_user},%{nc_group}) %{nc_dir}/ocs*
126  %attr(0755,%{nc_user},%{nc_group}) %{nc_dir}/*.php  %attr(0755,%{nc_user},%{nc_group}) %{nc_dir}/*.php
127  %attr(0755,%{nc_user},%{nc_group}) %{nc_dir}/AUTHORS  %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  %attr(0755,%{nc_user},%{nc_group}) %{nc_dir}/index.html
130  %attr(0755,%{nc_user},%{nc_group}) %{nc_dir}/robots.txt  %attr(0755,%{nc_user},%{nc_group}) %{nc_dir}/robots.txt
131  %attr(0644,%{nc_user},%{nc_group}) %{nc_dir}/.htaccess  %attr(0644,%{nc_user},%{nc_group}) %{nc_dir}/.htaccess
# Line 103  cp %{SOURCE1} %{buildroot}/etc/httpd/con Line 137  cp %{SOURCE1} %{buildroot}/etc/httpd/con
137    
138    
139  %changelog  %changelog
140  * Fri Dec 21 2018 Jean-Philipe Pialasse <tests@pialasse.com> 15.0.0-2.sme  * 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]  - 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  * Wed Dec 19 2018 Jean-Philipe Pialasse <tests@pialasse.com> 13.0.1-5.sme


Legend:
Removed lines/characters  
Changed lines/characters
  Added lines/characters

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