- update to 2.5.7
authorElan Ruusamäe <glen@pld-linux.org>
Fri, 28 Jan 2005 18:55:44 +0000 (18:55 +0000)
committercvs2git <feedback@pld-linux.org>
Sun, 24 Jun 2012 12:13:13 +0000 (12:13 +0000)
- support for php/php4 and apache1/apache

Changed files:
    ZendGuardLoader.spec -> 1.16

ZendGuardLoader.spec

index de3b30f..9223d93 100644 (file)
@@ -1,4 +1,4 @@
-# DO NOT MODIFY CONTENTS OF PACKAFE - AGAINST LICENSE AND MAKES IT UNDISTRIBUTABLE
+# DO NOT MODIFY CONTENTS OF PACKAGE - AGAINST LICENSE AND MAKES IT UNDISTRIBUTABLE
 # AND ALSO IT IS ALREADY STRIPPED.
 
 %define                no_install_post_strip           1
@@ -7,18 +7,18 @@
 Summary:       Zend Optimizer - PHP4 code optimizer
 Summary(pl):   Zend Optimizer - optymalizator kodu PHP4
 Name:          ZendOptimizer
-Version:       2.5.3
-Release:       1
+Version:       2.5.7
+Release:       0.6
 License:       Zend License, distributable only if unmodified and for free (see LICENSE)
 Group:         Libraries
 Source0:       %{name}-%{version}-linux-glibc21-i386.tar.gz
-# Source0-md5: dae8497abc6b5596dc29c265d0978d79
+# Source0-md5: 441192fb05882126242657d180a4c96a
 Source1:       %{name}-%{version}-linux-glibc23-amd64.tar.gz
-# Source1-md5: 007b4e3d7911ff03b760ec773472a2bb
+# Source1-md5: 1c22955ad63d1c73f969ebd9c4899b7d
 URL:           http://www.zend.com/zend/optimizer.php
 Requires(post):        grep >= 2:2.5.1
 Requires(post):        sed >= 4.0.0
-Requires(post):        /usr/bin/perl
+#Requires(post):       /usr/bin/perl
 # php4 provides php with epoch 0 while php provides php with epoch 3, workaround
 Requires:      php >= 0:4.0.6
 ExclusiveArch: %{ix86} amd64
@@ -43,8 +43,8 @@ Zend Optimizer - optymalizator kodu PHP.
 %install
 rm -rf $RPM_BUILD_ROOT
 install -d $RPM_BUILD_ROOT{%{_libdir}/Zend/lib/Optimizer{,_TS}-%{version},%{_bindir},/etc/php,}
-install -d $RPM_BUILD_ROOT%{_libdir}/Zend/lib/Optimizer-%{version}/php-{4.0.6,4.1.x,4.2.0,4.2.x,4.3.x,5.0.0}
-install -d $RPM_BUILD_ROOT%{_libdir}/Zend/lib/Optimizer_TS-%{version}/php-{4.2.x,4.3.x,5.0.0}
+install -d $RPM_BUILD_ROOT%{_libdir}/Zend/lib/Optimizer-%{version}/php-{4.0.6,4.1.x,4.2.0,4.2.x,4.3.x,5.0.x}
+install -d $RPM_BUILD_ROOT%{_libdir}/Zend/lib/Optimizer_TS-%{version}/php-{4.2.x,4.3.x,5.0.x}
 
 %ifarch %{ix86}
 cd %{name}-%{version}-linux-glibc21-i386
@@ -66,11 +66,11 @@ install 4_1_x_comp/ZendOptimizer.so $RPM_BUILD_ROOT%{_libdir}/Zend/lib/Optimizer
 install 4_2_0_comp/ZendOptimizer.so $RPM_BUILD_ROOT%{_libdir}/Zend/lib/Optimizer-%{version}/php-4.2.0
 install 4_2_x_comp/ZendOptimizer.so $RPM_BUILD_ROOT%{_libdir}/Zend/lib/Optimizer-%{version}/php-4.2.x
 install 4_3_x_comp/ZendOptimizer.so $RPM_BUILD_ROOT%{_libdir}/Zend/lib/Optimizer-%{version}/php-4.3.x
-install 5_0_0_comp/ZendOptimizer.so $RPM_BUILD_ROOT%{_libdir}/Zend/lib/Optimizer-%{version}/php-5.0.0
+install 5_0_x_comp/ZendOptimizer.so $RPM_BUILD_ROOT%{_libdir}/Zend/lib/Optimizer-%{version}/php-5.0.x
 
 install 4_2_x_comp/TS/ZendOptimizer.so $RPM_BUILD_ROOT%{_libdir}/Zend/lib/Optimizer_TS-%{version}/php-4.2.x
 install 4_3_x_comp/TS/ZendOptimizer.so $RPM_BUILD_ROOT%{_libdir}/Zend/lib/Optimizer_TS-%{version}/php-4.3.x
-install 5_0_0_comp/TS/ZendOptimizer.so $RPM_BUILD_ROOT%{_libdir}/Zend/lib/Optimizer_TS-%{version}/php-5.0.0
+install 5_0_x_comp/TS/ZendOptimizer.so $RPM_BUILD_ROOT%{_libdir}/Zend/lib/Optimizer_TS-%{version}/php-5.0.x
 
 ln -s /etc/php $RPM_BUILD_ROOT%{_libdir}/Zend/etc
 ln -s %{_bindir} $RPM_BUILD_ROOT%{_libdir}/Zend//bin
@@ -82,42 +82,59 @@ rm -rf $RPM_BUILD_ROOT
 # THEN AGAIN HE/SHE SHOULD USE THEIR OPTIMIZER
 
 %preun
-if [ -f /etc/php/php.ini ]; then
-       echo "deactivating module 'ZendOptimizer.so' in php.ini" 1>&2
-#perl -pi -e 's|^zend_optimizer.optimization_level|;zend_optimizer.optimization_level|g' \
-#      /etc/php/php.ini
-       grep -v '\[Zend\]' /etc/php/php.ini |\
-       grep -v zend_extension |grep -v zend_optimizer > /etc/php/php.ini.tmp
-       mv /etc/php/php.ini.tmp /etc/php/php.ini
-fi
-if [ -f /var/lock/subsys/httpd ]; then
-       /etc/rc.d/init.d/httpd restart 1>&2
+if [ "$1" = "0" ]; then
+       umask 022
+       for php in /etc/php{,4}/php.ini; do
+               if [ -f $php ]; then
+                       echo "deactivating module 'ZendOptimizer.so' in $php" 1>&2
+                       grep -v '\[Zend\]' $php |\
+                       grep -v zend_extension |grep -v zend_optimizer > $php.tmp
+                       mv $php.tmp $php
+               fi
+       done
+       # apache1
+       if [ -f /var/lock/subsys/apache ]; then
+               /etc/rc.d/init.d/apache restart 1>&2
+       fi
+       # apache2
+       if [ -f /var/lock/subsys/httpd ]; then
+               /etc/rc.d/init.d/httpd restart 1>&2
+       fi
 fi
 
 %post
-if [ -f /etc/php/php.ini ]; then
-       echo "activating module 'ZendOptimizer.so' in php.ini" 1>&2
-       if grep -q ^zend_optimizer.optimization_level ; then
-       optlevel=`grep ^zend_optimizer /etc/php/php.ini|cut -d'=' -f2|tr -d ' '|tr -d '"'|tr -d "'"|tr -d ';'`
-       else
-       optlevel="15"
+umask 022
+for php in /etc/php{,4}/php.ini; do
+       if [ -f $php ]; then
+               echo "activating module 'ZendOptimizer.so' in $php" 1>&2
+               if grep -q ^zend_optimizer.optimization_level ; then
+                       optlevel=`grep ^zend_optimizer $php|cut -d'=' -f2|tr -d ' '|tr -d '"'|tr -d "'"|tr -d ';'`
+               else
+                       optlevel="15"
+               fi
+               cp $php{,.zend-backup}
+               grep -v zend_optimizer.optimization_level $php | \
+               grep -v zend_extension > $php.tmp
+               echo '[Zend]' >> $php.tmp
+               echo "zend_optimizer.optimization_level=$optlevel" >> $php.tmp
+               echo "zend_extension_manager.optimizer=%{_libdir}/Zend/lib/Optimizer-%{version}" >> $php.tmp
+               echo "zend_extension_manager.optimizer_ts=%{_libdir}/Zend/lib/Optimizer_TS-%{version}" >> $php.tmp
+               echo "zend_extension=%{_libdir}/Zend/lib/ZendExtensionManager.so" >> $php.tmp
+               echo "zend_extension_ts=%{_libdir}/Zend/lib/ZendExtensionManager_TS.so" >> $php.tmp
+               mv $php{.tmp,}
        fi
-       cp /etc/php/php.ini{,.zend-backup}
-       grep -v zend_optimizer.optimization_level /etc/php/php.ini | \
-       grep -v zend_extension > /etc/php/php.ini.tmp
-       echo '[Zend]' >> /etc/php/php.ini.tmp
-       echo "zend_optimizer.optimization_level=$optlevel" >> /etc/php/php.ini.tmp
-       echo "zend_extension_manager.optimizer=%{_libdir}/Zend/lib/Optimizer-%{version}" >> /etc/php/php.ini.tmp
-       echo "zend_extension_manager.optimizer_ts=%{_libdir}/Zend/lib/Optimizer_TS-%{version}" >> /etc/php/php.ini.tmp
-       echo "zend_extension=%{_libdir}/Zend/lib/ZendExtensionManager.so" >> /etc/php/php.ini.tmp
-       echo "zend_extension_ts=%{_libdir}/Zend/lib/ZendExtensionManager_TS.so" >> /etc/php/php.ini.tmp
-       mv /etc/php/php.ini{.tmp,}
+done
+
+# apache1
+if [ -f /var/lock/subsys/apache ]; then
+       /etc/rc.d/init.d/apache restart 1>&2
 fi
+# apache2
 if [ -f /var/lock/subsys/httpd ]; then
        /etc/rc.d/init.d/httpd restart 1>&2
 fi
 
-echo "Remember:Read the /usr/share/doc/ZendOptimizer-%{version}/LICENSE!"
+echo "Remember: Read the /usr/share/doc/ZendOptimizer-%{version}/LICENSE !"
 
 %files
 %defattr(644,root,root,755)
@@ -132,27 +149,27 @@ echo "Remember:Read the /usr/share/doc/ZendOptimizer-%{version}/LICENSE!"
 %{_sysconfdir}/php/poweredbyoptimizer.gif
 %dir %{_libdir}/Zend
 %dir %{_libdir}/Zend/lib/
-%dir %{_libdir}/Zend/lib/Optimizer-2.5.3/php-4.0.6
-%dir %{_libdir}/Zend/lib/Optimizer-2.5.3/php-4.1.x
-%dir %{_libdir}/Zend/lib/Optimizer-2.5.3/php-4.2.0
-%dir %{_libdir}/Zend/lib/Optimizer-2.5.3/php-4.2.x
-%dir %{_libdir}/Zend/lib/Optimizer-2.5.3/php-4.3.x
-%dir %{_libdir}/Zend/lib/Optimizer-2.5.3/php-5.0.0
-%dir %{_libdir}/Zend/lib/Optimizer-2.5.3
-%dir %{_libdir}/Zend/lib/Optimizer_TS-2.5.3
-%dir %{_libdir}/Zend/lib/Optimizer_TS-2.5.3/php-4.2.x
-%dir %{_libdir}/Zend/lib/Optimizer_TS-2.5.3/php-4.3.x
-%dir %{_libdir}/Zend/lib/Optimizer_TS-2.5.3/php-5.0.0
+%dir %{_libdir}/Zend/lib/Optimizer-%{version}/php-4.0.6
+%dir %{_libdir}/Zend/lib/Optimizer-%{version}/php-4.1.x
+%dir %{_libdir}/Zend/lib/Optimizer-%{version}/php-4.2.0
+%dir %{_libdir}/Zend/lib/Optimizer-%{version}/php-4.2.x
+%dir %{_libdir}/Zend/lib/Optimizer-%{version}/php-4.3.x
+%dir %{_libdir}/Zend/lib/Optimizer-%{version}/php-5.0.x
+%dir %{_libdir}/Zend/lib/Optimizer-%{version}
+%dir %{_libdir}/Zend/lib/Optimizer_TS-%{version}
+%dir %{_libdir}/Zend/lib/Optimizer_TS-%{version}/php-4.2.x
+%dir %{_libdir}/Zend/lib/Optimizer_TS-%{version}/php-4.3.x
+%dir %{_libdir}/Zend/lib/Optimizer_TS-%{version}/php-5.0.x
 %{_libdir}/Zend/bin
 %{_libdir}/Zend/etc
-%{_libdir}/Zend/lib/Optimizer-2.5.3/php-4.0.6/ZendOptimizer.so
-%{_libdir}/Zend/lib/Optimizer-2.5.3/php-4.1.x/ZendOptimizer.so
-%{_libdir}/Zend/lib/Optimizer-2.5.3/php-4.2.0/ZendOptimizer.so
-%{_libdir}/Zend/lib/Optimizer-2.5.3/php-4.2.x/ZendOptimizer.so
-%{_libdir}/Zend/lib/Optimizer-2.5.3/php-4.3.x/ZendOptimizer.so
-%{_libdir}/Zend/lib/Optimizer-2.5.3/php-5.0.0/ZendOptimizer.so
+%{_libdir}/Zend/lib/Optimizer-%{version}/php-4.0.6/ZendOptimizer.so
+%{_libdir}/Zend/lib/Optimizer-%{version}/php-4.1.x/ZendOptimizer.so
+%{_libdir}/Zend/lib/Optimizer-%{version}/php-4.2.0/ZendOptimizer.so
+%{_libdir}/Zend/lib/Optimizer-%{version}/php-4.2.x/ZendOptimizer.so
+%{_libdir}/Zend/lib/Optimizer-%{version}/php-4.3.x/ZendOptimizer.so
+%{_libdir}/Zend/lib/Optimizer-%{version}/php-5.0.x/ZendOptimizer.so
 %{_libdir}/Zend/lib/ZendExtensionManager.so
-%{_libdir}/Zend/lib/Optimizer_TS-2.5.3/php-4.2.x/ZendOptimizer.so
-%{_libdir}/Zend/lib/Optimizer_TS-2.5.3/php-4.3.x/ZendOptimizer.so
-%{_libdir}/Zend/lib/Optimizer_TS-2.5.3/php-5.0.0/ZendOptimizer.so
+%{_libdir}/Zend/lib/Optimizer_TS-%{version}/php-4.2.x/ZendOptimizer.so
+%{_libdir}/Zend/lib/Optimizer_TS-%{version}/php-4.3.x/ZendOptimizer.so
+%{_libdir}/Zend/lib/Optimizer_TS-%{version}/php-5.0.x/ZendOptimizer.so
 %{_libdir}/Zend/lib/ZendExtensionManager_TS.so
This page took 0.040573 seconds and 4 git commands to generate.