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

Diff of /rpms/nextcloud/contribs10/nextcloud.spec

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

Revision 1.6 by jpp, Fri Jul 8 05:36:16 2022 UTC Revision 1.10 by jpp, Mon Jan 29 03:36:49 2024 UTC
# Line 1  Line 1 
1  %define version 24.0.2  %define version 26.0.11
2  %define release 2  %define release 1
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 28  BuildRequires: httpd Line 28  BuildRequires: httpd
28    
29  Requires: httpd  Requires: httpd
30  # Required php packages  # Required php packages
31  Requires: php74  Requires: php81
32  Requires: php74-php-fpm  Requires: php81-php-fpm
33  Requires: php74-php-gd  Requires: php81-php-gd
34  Requires: php74-php-pdo  Requires: php81-php-pdo
35  Requires: php74-php-mbstring  Requires: php81-php-mbstring
36  Requires: php74-php-pecl-zip  Requires: php81-php-pecl-zip
37  Requires: php74-php-imagick  Requires: php81-php-imagick
38    
39  # Recommended php packages  # Recommended php packages
40  Requires: php74-php-intl  Requires: php81-php-intl
41  Requires: php74-php-mcrypt  Requires: php81-php-mcrypt
42    
43  # Required php packages for specific apps  # Required php packages for specific apps
44  Requires: php74-php-ldap  Requires: php81-php-ldap
45    
46  # Required php packages for MariaDB  # Required php packages for MariaDB
47  Requires: php74-php-mysqlnd  Requires: php81-php-mysqlnd
48  #rh-php71-php-pdo_mysql  #rh-php71-php-pdo_mysql
49    
 # Conflicts: nextcloud < 15  
50    
51  %description  %description
52  Nextcloud files and configuration.  Nextcloud files and configuration.
# Line 68  nc_dir:        %{nc_dir} Line 67  nc_dir:        %{nc_dir}
67  nc_data_dir:   %{nc_data_dir}  nc_data_dir:   %{nc_data_dir}
68  nc_config_dir: %{nc_config_dir}  nc_config_dir: %{nc_config_dir}
69    
   
   
70  %pre  %pre
 # true if $1 is greater than or equal $2  
 verlte() {  
     [  "$1" = "`echo -e "$1\n$2" | sort -V | head -n1`" ]  
 }  
   
 verlt() {  
     [ "$1" = "$2" ] && return 1 || verlte $1 $2  
 }  
 # if there is already an installed version  
 if [ -f /usr/share/nextcloud/version.php ]  
 then  
     echo "version.php found, already installed"  
     # get version number  
     installedver=`php  -r 'require("/usr/share/nextcloud/version.php"); print "$OC_VersionString";'`;  
     majvers=`echo %{version} | cut -d. -f1`  
     majcurvers=`echo $installedver | cut -d. -f1`  
     # we should fail with exit 1 if  
         # installed version  > rpm version  
         if ( verlte %{version} $installedver )  
                 then  
                 echo "Installed version has $installedver been upgraded and is most recent than this rpm %{version} version"  
 #               echo "backup current install to /usr/share/nextcloud_back"  
 #               mkdir /usr/share/nextcloud_back  
 #               rsync -ar /usr/share/nextcloud/ /usr/share/nextcloud_back  
                 exit 1  
         elif [ $(($majvers-1)) -gt $majcurvers ]  
                 then # installed version < rpm version -1  
                 echo "can not upgrade from $installedver to %{version}, please do a manual or web update with intermediate version"  
 #               echo "backup current install to /usr/share/nextcloud_back"  
 #                mkdir /usr/share/nextcloud_back  
 #                rsync -ar /usr/share/nextcloud/ /usr/share/nextcloud_back  
                 exit 1  
         fi  
 fi  
71    
72  %postun  %postun
 # true if $1 is greater than or equal $2  
 verlte() {  
     [  "$1" = "`echo -e "$1\n$2" | sort -V | head -n1`" ]  
 }  
   
 verlt() {  
     [ "$1" = "$2" ] && return 1 || verlte $1 $2  
 }  
   
 if [ $1 == 1 ]; then  
 # if there is already an installed version  
 if [ -f /usr/share/nextcloud/version.php ]  
 then  
 #    echo "version.php found, already installed"  
     # get version number  
     installedver=`php  -r 'require("/usr/share/nextcloud/version.php"); print "$OC_VersionString";'`;  
     majvers=`echo %{version} | cut -d. -f1`  
     majcurvers=`echo $installedver | cut -d. -f1`  
 #    echo "and the version is $installedver"  
     # we should fail with exit 1 if  
         # installed version  > rpm version  
         if ( verlte %{version} $installedver )  
                 then  
 #                echo "reverting content"  
 #                rsync -ar /usr/share/nextcloud_back/ /usr/share/nextcloud_back  
 #               rm -rf /usr/share/nextcloud_back  
                 exit 0  
         elif [ $(($majvers-1)) -gt $majcurvers ]  
                 then # installed version < rpm version -1  
 #               echo "reverting content"  
 #                rsync -ar /usr/share/nextcloud_back/ /usr/share/nextcloud_back  
 #                rm -rf /usr/share/nextcloud_back  
                 exit 0  
         fi  
 fi  
 fi  
73    
74  %install  %install
75  rm -rf %{buildroot}  rm -rf %{buildroot}
# Line 172  cp %{SOURCE1} %{buildroot}/etc/httpd/con Line 99  cp %{SOURCE1} %{buildroot}/etc/httpd/con
99  %attr(0775,%{nc_user},%{nc_group}) %{nc_data_dir}  %attr(0775,%{nc_user},%{nc_group}) %{nc_data_dir}
100  %attr(0775,%{nc_user},%{nc_group}) %{nc_config_dir}  %attr(0775,%{nc_user},%{nc_group}) %{nc_config_dir}
101  %attr(0755,%{nc_user},%{nc_group}) %{nc_dir}/lib  %attr(0755,%{nc_user},%{nc_group}) %{nc_dir}/lib
102  %attr(0755,%{nc_user},%{nc_group}) %{nc_dir}/ocm-provider  #%attr(0755,%{nc_user},%{nc_group}) %{nc_dir}/ocm-provider
103  %attr(0755,%{nc_user},%{nc_group}) %{nc_dir}/core  %attr(0755,%{nc_user},%{nc_group}) %{nc_dir}/core
104  #%attr(0755,%{nc_user},%{nc_group}) %{nc_dir}/settings  #%attr(0755,%{nc_user},%{nc_group}) %{nc_dir}/settings
105  %attr(0755,%{nc_user},%{nc_group}) %{nc_dir}/3rdparty  %attr(0755,%{nc_user},%{nc_group}) %{nc_dir}/3rdparty
# Line 185  cp %{SOURCE1} %{buildroot}/etc/httpd/con Line 112  cp %{SOURCE1} %{buildroot}/etc/httpd/con
112  %attr(0755,%{nc_user},%{nc_group}) %{nc_dir}/index.html  %attr(0755,%{nc_user},%{nc_group}) %{nc_dir}/index.html
113  %attr(0755,%{nc_user},%{nc_group}) %{nc_dir}/robots.txt  %attr(0755,%{nc_user},%{nc_group}) %{nc_dir}/robots.txt
114  %attr(0644,%{nc_user},%{nc_group}) %{nc_dir}/.htaccess  %attr(0644,%{nc_user},%{nc_group}) %{nc_dir}/.htaccess
115  %attr(0644,%{nc_user},%{nc_group}) %{nc_dir}/dist  %attr(0755,%{nc_user},%{nc_group}) %{nc_dir}/dist
116    
117    %attr(0644,%{nc_user},%{nc_group}) %{nc_dir}/composer.json
118    %attr(0644,%{nc_user},%{nc_group}) %{nc_dir}/composer.lock
119    %attr(0644,%{nc_user},%{nc_group}) %{nc_dir}/package-lock.json
120    %attr(0644,%{nc_user},%{nc_group}) %{nc_dir}/package.json
121    
122  %config(noreplace) %attr(0644,%{nc_user},%{nc_group}) %{nc_dir}/.user.ini  %config(noreplace) %attr(0644,%{nc_user},%{nc_group}) %{nc_dir}/.user.ini
123  %config(noreplace) %attr(0644,root,root) /etc/httpd/conf.d/nextcloud.conf  %config(noreplace) %attr(0644,root,root) /etc/httpd/conf.d/nextcloud.conf
# Line 194  cp %{SOURCE1} %{buildroot}/etc/httpd/con Line 126  cp %{SOURCE1} %{buildroot}/etc/httpd/con
126    
127    
128  %changelog  %changelog
129    * Sun Jan 28 2024 Jean-Philippe Pialasse <tests@pialasse.com> 26.0.11-1.sme
130    - update to release 26.0.11
131    
132    * Fri Jul 08 2022 Jean-Philippe Pialasse <tests@pialasse.com> 24.0.2-3.sme
133    - removing pre and postun scripts
134    - fix dist permissions
135    
136  * Fri Jul 08 2022 Jean-Philippe Pialasse <tests@pialasse.com> 24.0.2-2.sme  * Fri Jul 08 2022 Jean-Philippe Pialasse <tests@pialasse.com> 24.0.2-2.sme
137  - update to release 24.0.2  - update to release 24.0.2
138  - make rpm a -src to avoid conflict between webupdates and rpm  - make rpm a -src to avoid conflict between webupdates and rpm


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