]> git.pld-linux.org Git - packages/php-xcache.git/commitdiff
- use new php extension macros
authorElan Ruusamäe <glen@pld-linux.org>
Tue, 16 Jan 2007 22:07:11 +0000 (22:07 +0000)
committercvs2git <feedback@pld-linux.org>
Sun, 24 Jun 2012 12:13:13 +0000 (12:13 +0000)
Changed files:
    php-xcache.spec -> 1.6

php-xcache.spec

index 37ebe55a1cda3f8602497f8bfd96e810a0e6ba33..620d942cf7598fe95e834cd4a1cfaa5e584565d0 100644 (file)
@@ -1,6 +1,4 @@
 %define                _modname        xcache
-%define                _sysconfdir     /etc/php
-%define                extensionsdir   %(php-config --extension-dir 2>/dev/null)
 Summary:       %{_modname} - PHP opcode cacher
 Summary(pl):   %{_modname} - buforowanie opcodów PHP
 Name:          php-%{_modname}
@@ -12,10 +10,10 @@ URL:                http://trac.lighttpd.net/xcache/
 Source0:       http://210.51.190.228/pub/XCache/rc/1.2.0-rc1/xcache-%{version}-rc1.tar.bz2
 # Source0-md5: a518400a879d8904771867b9f50a650d
 BuildRequires: php-devel >= 3:5.0
-BuildRequires: rpmbuild(macros) >= 1.254
+BuildRequires: rpmbuild(macros) >= 1.344
 BuildRequires: sed >= 4.0
 %{?requires_zend_extension}
-Requires:      %{_sysconfdir}/conf.d
+Requires:      php-common >= 4:5.0.4
 BuildRoot:     %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
 
 %description
@@ -34,34 +32,32 @@ phpize
 %configure
 %{__make}
 %{__sed} -i -e '
-       s,zend_extension =.*,zend_extension = %{extensionsdir}/xcache.so,
-       s,zend_extension_ts = .*,zend_extension_ts = %{extensionsdir}/xcache.so,
+       s,zend_extension =.*,zend_extension = %{php_extensiondir}/xcache.so,
+       s,zend_extension_ts = .*,zend_extension_ts = %{php_extensiondir}/xcache.so,
 ' xcache.ini
 
 %install
 rm -rf $RPM_BUILD_ROOT
-install -d $RPM_BUILD_ROOT%{_sysconfdir}/conf.d
+install -d $RPM_BUILD_ROOT%{php_sysconfdir}/conf.d
 
 %{__make} install \
        INSTALL_ROOT=$RPM_BUILD_ROOT
 
-install xcache.ini $RPM_BUILD_ROOT%{_sysconfdir}/conf.d/%{_modname}.ini
+install xcache.ini $RPM_BUILD_ROOT%{php_sysconfdir}/conf.d/%{_modname}.ini
 
 %clean
 rm -rf $RPM_BUILD_ROOT
 
 %post
-[ ! -f /etc/apache/conf.d/??_mod_php.conf ] || %service -q apache restart
-[ ! -f /etc/httpd/httpd.conf/??_mod_php.conf ] || %service -q httpd restart
+%php_webserver_restart
 
 %postun
 if [ "$1" = 0 ]; then
-       [ ! -f /etc/apache/conf.d/??_mod_php.conf ] || %service -q apache restart
-       [ ! -f /etc/httpd/httpd.conf/??_mod_php.conf ] || %service -q httpd restart
+       %php_webserver_restart
 fi
 
 %files
 %defattr(644,root,root,755)
 %doc AUTHORS README THANKS
-%config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/conf.d/%{_modname}.ini
-%attr(755,root,root) %{extensionsdir}/%{_modname}.so
+%config(noreplace) %verify(not md5 mtime size) %{php_sysconfdir}/conf.d/%{_modname}.ini
+%attr(755,root,root) %{php_extensiondir}/%{_modname}.so
This page took 0.074868 seconds and 4 git commands to generate.