]> git.pld-linux.org Git - packages/php-rrdtool.git/commitdiff
- use new php extension macros
authorElan Ruusamäe <glen@pld-linux.org>
Tue, 26 Dec 2006 20:35:57 +0000 (20:35 +0000)
committercvs2git <feedback@pld-linux.org>
Sun, 24 Jun 2012 12:13:13 +0000 (12:13 +0000)
Changed files:
    php-rrdtool.spec -> 1.15

php-rrdtool.spec

index dc5162a540cd5f2cef6bda96556378d3c70ff436..457838444d06a1ec4571b9dd400af2f21705cdb7 100644 (file)
@@ -1,11 +1,9 @@
 %define                _modname        rrdtool
-%define                _sysconfdir     /etc/php
-%define                extensionsdir   %(php-config --extension-dir 2>/dev/null)
 Summary:       RRDtool PHP module
 Summary(pl):   Modu³ PHP RRDtool
 Name:          php-rrdtool
 Version:       1.2
-Release:       1
+Release:       2
 License:       GPL
 Group:         Applications/Databases
 Source0:       http://people.ee.ethz.ch/~oetiker/webtools/rrdtool/pub/contrib/php_rrdtool.tgz
@@ -16,7 +14,7 @@ BuildRequires:        rpmbuild(macros) >= 1.322
 BuildRequires: rrdtool-devel >= 1.2.10
 BuildRequires: sed >= 4.0
 %{?requires_php_extension}
-Requires:      %{_sysconfdir}/conf.d
+Requires:      php-common >= 4:5.0.4
 BuildRoot:     %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
 
 %description
@@ -41,12 +39,12 @@ phpize
 
 %install
 rm -rf $RPM_BUILD_ROOT
-install -d $RPM_BUILD_ROOT{%{_sysconfdir}/conf.d,%{_examplesdir}/%{name}-%{version}}
+install -d $RPM_BUILD_ROOT{%{php_sysconfdir}/conf.d,%{_examplesdir}/%{name}-%{version}}
 
 %{__make} install \
        INSTALL_ROOT=$RPM_BUILD_ROOT
 
-cat <<'EOF' > $RPM_BUILD_ROOT%{_sysconfdir}/conf.d/%{_modname}.ini
+cat <<'EOF' > $RPM_BUILD_ROOT%{php_sysconfdir}/conf.d/%{_modname}.ini
 ; Enable %{_modname} extension module
 extension=%{_modname}.so
 EOF
@@ -55,16 +53,14 @@ EOF
 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)
-%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.069733 seconds and 4 git commands to generate.