SPECS: template-php-pecl.spec, template-php4-pecl.spec - use new p...

glen glen at pld-linux.org
Fri Dec 15 00:18:04 CET 2006


Author: glen                         Date: Thu Dec 14 23:18:04 2006 GMT
Module: SPECS                         Tag: HEAD
---- Log message:
- use new php extension related macros

---- Files affected:
SPECS:
   template-php-pecl.spec (1.21 -> 1.22) , template-php4-pecl.spec (1.13 -> 1.14) 

---- Diffs:

================================================================
Index: SPECS/template-php-pecl.spec
diff -u SPECS/template-php-pecl.spec:1.21 SPECS/template-php-pecl.spec:1.22
--- SPECS/template-php-pecl.spec:1.21	Fri Nov  3 00:09:09 2006
+++ SPECS/template-php-pecl.spec	Fri Dec 15 00:17:59 2006
@@ -2,7 +2,6 @@
 %define		_modname	-
 %define		_status		-
 %define		_sysconfdir	/etc/php
-%define		extensionsdir	%(php-config --extension-dir 2>/dev/null)
 
 Summary:	%{_modname} -
 Summary(pl):	%{_modname} -
@@ -14,9 +13,9 @@
 Source0:	http://pecl.php.net/get/%{_modname}-%{version}.tgz
 URL:		http://pecl.php.net/package/Modname/
 BuildRequires:	php-devel >= 3:5.0.0
-BuildRequires:	rpmbuild(macros) >= 1.322
+BuildRequires:	rpmbuild(macros) >= 1.344
 %{?requires_php_extension}
-Requires:	%{_sysconfdir}/conf.d
+Requires:	%{php_sysconfdir}/conf.d
 BuildRoot:	%{tmpdir}/%{name}-%{version}-root-%(id -u -n)
 
 %description
@@ -38,13 +37,13 @@
 
 %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 \
 	-C %{_modname}-%{version} \
 	INSTALL_ROOT=$RPM_BUILD_ROOT \
-	EXTENSION_DIR=%{extensionsdir}
-cat <<'EOF' > $RPM_BUILD_ROOT%{_sysconfdir}/conf.d/%{_modname}.ini
+	EXTENSION_DIR=%{php_extensiondir}
+cat <<'EOF' > $RPM_BUILD_ROOT%{php_sysconfdir}/conf.d/%{_modname}.ini
 ; Enable %{_modname} extension module
 extension=%{_modname}.so
 EOF
@@ -53,20 +52,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 %{_modname}-%{version}/{CREDITS,EXPERIMENTAL}
-%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
 
 %define date	%(echo `LC_ALL="C" date +"%a %b %d %Y"`)
 %changelog
@@ -74,6 +71,9 @@
 All persons listed below can be reached at <cvs_login>@pld-linux.org
 
 $Log$
+Revision 1.22  2006/12/14 23:17:59  glen
+- use new php extension related macros
+
 Revision 1.21  2006/11/02 23:09:09  glen
 - BR rpmmacros for fixed %requires_php_extension
 

================================================================
Index: SPECS/template-php4-pecl.spec
diff -u SPECS/template-php4-pecl.spec:1.13 SPECS/template-php4-pecl.spec:1.14
--- SPECS/template-php4-pecl.spec:1.13	Fri Nov  3 00:09:09 2006
+++ SPECS/template-php4-pecl.spec	Fri Dec 15 00:17:59 2006
@@ -1,8 +1,6 @@
 # $Revision$, $Date$
 %define		_modname	-
 %define		_status		-
-%define		_sysconfdir	/etc/php4
-%define		extensionsdir	%(php-config --extension-dir 2>/dev/null)
 
 Summary:	%{_modname} -
 Summary(pl):	%{_modname} -
@@ -14,9 +12,9 @@
 Source0:	http://pecl.php.net/get/%{_modname}-%{version}.tgz
 URL:		http://pecl.php.net/package/Modname/
 BuildRequires:	php4-devel >= 3:4.0.0
-BuildRequires:	rpmbuild(macros) >= 1.322
+BuildRequires:	rpmbuild(macros) >= 1.344
 %{?requires_php_extension}
-Requires:	%{_sysconfdir}/conf.d
+Requires:	%{php_sysconfdir}/conf.d
 BuildRoot:	%{tmpdir}/%{name}-%{version}-root-%(id -u -n)
 
 %description
@@ -38,13 +36,13 @@
 
 %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 \
 	-C %{_modname}-%{version} \
 	INSTALL_ROOT=$RPM_BUILD_ROOT \
-	EXTENSION_DIR=%{extensionsdir}
-cat <<'EOF' > $RPM_BUILD_ROOT%{_sysconfdir}/conf.d/%{_modname}.ini
+	EXTENSION_DIR=%{php_extensiondir}
+cat <<'EOF' > $RPM_BUILD_ROOT%{php_sysconfdir}/conf.d/%{_modname}.ini
 ; Enable %{_modname} extension module
 extension=%{_modname}.so
 EOF
@@ -53,20 +51,18 @@
 rm -rf $RPM_BUILD_ROOT
 
 %post
-[ ! -f /etc/apache/conf.d/??_mod_php4.conf ] || %service -q apache restart
-[ ! -f /etc/httpd/httpd.conf/??_mod_php4.conf ] || %service -q httpd restart
+%php4_webserver_restart
 
 %postun
 if [ "$1" = 0 ]; then
-	[ ! -f /etc/apache/conf.d/??_mod_php4.conf ] || %service -q apache restart
-	[ ! -f /etc/httpd/httpd.conf/??_mod_php4.conf ] || %service -q httpd restart
+	%php4_webserver_restart
 fi
 
 %files
 %defattr(644,root,root,755)
 %doc %{_modname}-%{version}/{CREDITS,EXPERIMENTAL,TODO,README}
-%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
 
 %define date	%(echo `LC_ALL="C" date +"%a %b %d %Y"`)
 %changelog
@@ -74,6 +70,9 @@
 All persons listed below can be reached at <cvs_login>@pld-linux.org
 
 $Log$
+Revision 1.14  2006/12/14 23:17:59  glen
+- use new php extension related macros
+
 Revision 1.13  2006/11/02 23:09:09  glen
 - BR rpmmacros for fixed %requires_php_extension
 
================================================================

---- CVS-web:
    http://cvs.pld-linux.org/SPECS/template-php-pecl.spec?r1=1.21&r2=1.22&f=u
    http://cvs.pld-linux.org/SPECS/template-php4-pecl.spec?r1=1.13&r2=1.14&f=u



More information about the pld-cvs-commit mailing list