SPECS (AC-branch): php-rrdtool.spec - use new php extension macros...

glen glen at pld-linux.org
Tue Dec 26 21:32:46 CET 2006


Author: glen                         Date: Tue Dec 26 20:32:46 2006 GMT
Module: SPECS                         Tag: AC-branch
---- Log message:
- use new php extension macros; rel 8

---- Files affected:
SPECS:
   php-rrdtool.spec (1.12.2.1 -> 1.12.2.2) 

---- Diffs:

================================================================
Index: SPECS/php-rrdtool.spec
diff -u SPECS/php-rrdtool.spec:1.12.2.1 SPECS/php-rrdtool.spec:1.12.2.2
--- SPECS/php-rrdtool.spec:1.12.2.1	Sat Dec 23 20:02:47 2006
+++ SPECS/php-rrdtool.spec	Tue Dec 26 21:32:41 2006
@@ -1,12 +1,10 @@
 # $Revision$, $Date$
 %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.0.50
-Release:	7
+Release:	8
 License:	GPL
 Group:		Applications/Databases
 Source0:	http://people.ee.ethz.ch/~oetiker/webtools/rrdtool/pub/rrdtool-1.0.x/rrdtool-%{version}.tar.gz
@@ -18,10 +16,10 @@
 BuildRequires:	gd-devel
 BuildRequires:	openssl-devel >= 0.9.5
 BuildRequires:	php-devel >= 3:5.0.0
-BuildRequires:	rpmbuild(macros) >= 1.238
+BuildRequires:	rpmbuild(macros) >= 1.344
 BuildRequires:	rrdtool-devel >= 1.2.10
 %{?requires_php_extension}
-Requires:	%{_sysconfdir}/conf.d
+Requires:	php-common >= 4:5.0.4
 BuildRoot:	%{tmpdir}/%{name}-%{version}-root-%(id -u -n)
 
 %description
@@ -48,13 +46,13 @@
 
 %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}}
 
 cd contrib/php4
 %{__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
@@ -65,20 +63,18 @@
 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 contrib/php4/USAGE
-%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
 %{_examplesdir}/%{name}-%{version}
 
 %define date	%(echo `LC_ALL="C" date +"%a %b %d %Y"`)
@@ -87,6 +83,9 @@
 All persons listed below can be reached at <cvs_login>@pld-linux.org
 
 $Log$
+Revision 1.12.2.2  2006/12/26 20:32:41  glen
+- use new php extension macros; rel 8
+
 Revision 1.12.2.1  2006/12/23 19:02:47  adamg
 - release 7 (rebuild against php-5.2.0)
 
================================================================

---- CVS-web:
    http://cvs.pld-linux.org/SPECS/php-rrdtool.spec?r1=1.12.2.1&r2=1.12.2.2&f=u



More information about the pld-cvs-commit mailing list