[php-eaccelerator] Add missing tmpwatch requirement (#711236)

Matthias Saou thias at fedoraproject.org
Wed Jul 13 15:56:08 UTC 2011


commit 21edfe5f5a87e9c44c8b412075966a1dc325ff50
Author: Matthias Saou <thias at marmotte.net>
Date:   Wed Jul 13 17:55:45 2011 +0200

    Add missing tmpwatch requirement (#711236)

 php-eaccelerator.spec |   36 +++++++++++++++++++++---------------
 1 files changed, 21 insertions(+), 15 deletions(-)
---
diff --git a/php-eaccelerator.spec b/php-eaccelerator.spec
index 79bbe82..d7118e5 100644
--- a/php-eaccelerator.spec
+++ b/php-eaccelerator.spec
@@ -11,7 +11,7 @@ Summary: PHP accelerator, optimizer, encoder and dynamic content cacher
 Name: php-eaccelerator
 Version: 0.9.6.1
 #Release: 0.2%{?svn:.svn%{svn}}%{?dist}
-Release: 6%{?dist}
+Release: 7%{?dist}
 Epoch: 1
 # The eaccelerator module itself is GPLv2+
 # The PHP control panel is under the Zend license (control.php and dasm.php)
@@ -28,6 +28,8 @@ Source1: php-eaccelerator.cron
 BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root
 # ABI check is not enough for this extension (http://eaccelerator.net/ticket/438)
 Requires: php-common%{?_isa} = %{php_version}
+# Required by our cleanup cron job
+Requires: tmpwatch
 Provides: php-zend_extension
 Conflicts: php-mmcache
 BuildRequires: php-devel >= 5.1.0
@@ -49,8 +51,8 @@ that the overhead of compiling is almost completely eliminated.
 
 
 # Change paths in the example config, other values are changed by a patch
-%{__sed} -i 's|/usr/lib/php4/|%{php_extdir}/|g;
-             s|/tmp/eaccelerator|%{_var}/cache/php-eaccelerator|g' \
+sed -i 's|/usr/lib/php4/|%{php_extdir}/|g;
+        s|/tmp/eaccelerator|%{_var}/cache/php-eaccelerator|g' \
     eaccelerator.ini
 
 
@@ -61,33 +63,33 @@ phpize
     --with-eaccelerator-userid="%{apache}"
 %endif
 
-%{__make} %{?_smp_mflags}
+make %{?_smp_mflags}
 
 
 %install
-%{__rm} -rf %{buildroot}
-%{__make} install INSTALL_ROOT=%{buildroot}
+rm -rf %{buildroot}
+make install INSTALL_ROOT=%{buildroot}
 
 # The cache directory where pre-compiled files will reside
-%{__mkdir_p} %{buildroot}%{_var}/cache/php-eaccelerator
+mkdir -p %{buildroot}%{_var}/cache/php-eaccelerator
 
 # Drop in the bit of configuration
-%{__install} -D -m 0644 eaccelerator.ini \
+install -D -m 0644 eaccelerator.ini \
     %{buildroot}%{_sysconfdir}/php.d/eaccelerator.ini
 
 # Cache removal cron job
-%{__install} -D -m 0755 -p %{SOURCE1} \
+install -D -m 0755 -p %{SOURCE1} \
     %{buildroot}%{_sysconfdir}/cron.daily/php-eaccelerator
 
 
 %clean
-%{__rm} -rf %{buildroot}
+rm -rf %{buildroot}
 
 
 %preun
 # Upon last removal (not update), clean all cache files
 if [ $1 -eq 0 ]; then
-    %{__rm} -rf %{_var}/cache/php-eaccelerator/* &>/dev/null || :
+    rm -rf %{_var}/cache/php-eaccelerator/* &>/dev/null || :
 fi
 
 %post
@@ -101,14 +103,14 @@ fi
 
 # Create the ghost'ed directory with default ownership and mode
 if [ ! -d %{_var}/cache/php-eaccelerator ]; then
-    %{__mkdir_p} %{_var}/cache/php-eaccelerator
-    %{__chown} %{apache}:%{apache} %{_var}/cache/php-eaccelerator
-    %{__chmod} 0750 %{_var}/cache/php-eaccelerator
+    mkdir -p %{_var}/cache/php-eaccelerator
+    chown %{apache}:%{apache} %{_var}/cache/php-eaccelerator
+    chmod 0750 %{_var}/cache/php-eaccelerator
 fi
 
 
 %check
-# only check if build extension can be loaded
+# Check if the built extension can be loaded
 %{_bindir}/php \
     -n -q -d extension_dir=modules \
     -d extension=eaccelerator.so \
@@ -129,6 +131,10 @@ fi
 
 
 %changelog
+* Wed Jul 13 2011 Matthias Saou <http://freshrpms.net/> 1:0.9.6.1-7
+- Add missing tmpwatch requirement (#711236).
+- Stop using macros for simple commands, following recent guidelines changes.
+
 * Thu Mar 17 2011 Remi Collet <Fedora at FamilleCollet.com> - 1:0.9.6.1-6
 - rebuild against PHP 5.3.6
 


More information about the scm-commits mailing list