SPECS: php4-pecl-APC.spec - use confdir php, rel 2

glen glen at pld-linux.org
Thu Aug 25 10:37:01 CEST 2005


Author: glen                         Date: Thu Aug 25 08:37:01 2005 GMT
Module: SPECS                         Tag: HEAD
---- Log message:
- use confdir php, rel 2

---- Files affected:
SPECS:
   php4-pecl-APC.spec (1.4 -> 1.5) 

---- Diffs:

================================================================
Index: SPECS/php4-pecl-APC.spec
diff -u SPECS/php4-pecl-APC.spec:1.4 SPECS/php4-pecl-APC.spec:1.5
--- SPECS/php4-pecl-APC.spec:1.4	Thu Aug 25 10:05:42 2005
+++ SPECS/php4-pecl-APC.spec	Thu Aug 25 10:36:56 2005
@@ -1,12 +1,13 @@
 # $Revision$, $Date$
 %define		_modname	APC
 %define		_status		stable
+%define		_sysconfdir	/etc/php4
 
 Summary:	%{_modname} - Alternative PHP Cache
 Summary(pl):	%{_modname} - alternatywne cache PHP
 Name:		php4-pecl-%{_modname}
 Version:	3.0.8
-Release:	1
+Release:	2
 License:	PHP
 Group:		Development/Languages/PHP
 Source0:	http://pecl.php.net/get/%{_modname}-%{version}.tgz
@@ -14,12 +15,11 @@
 URL:		http://pecl.php.net/package/APC/
 BuildRequires:	libtool
 BuildRequires:	php4-devel >= 3:4.3.0
-Requires:	php4-common >= 3:4.3.0
+%requires_eq_to php4-common php4-devel
 Obsoletes:	php-pear-%{_modname}
 BuildRoot:	%{tmpdir}/%{name}-%{version}-root-%(id -u -n)
 
-%define		_sysconfdir	/etc/php4
-%define		extensionsdir	%{_libdir}/php4
+%define		extensionsdir	%(php-config --extension-dir 2>/dev/null)
 
 %description
 APC is the Alternative PHP Cache. It was conceived of to provide a
@@ -46,24 +46,31 @@
 
 %install
 rm -rf $RPM_BUILD_ROOT
-install -d $RPM_BUILD_ROOT%{extensionsdir}
+install -d $RPM_BUILD_ROOT{%{_sysconfdir}/conf.d,%{extensionsdir}}
 
 install %{_modname}-%{version}/modules/apc.so $RPM_BUILD_ROOT%{extensionsdir}/%{_modname}.so
+cat <<'EOF' > $RPM_BUILD_ROOT%{_sysconfdir}/conf.d/%{_modname}.ini
+; Enable %{_modname} extension module
+extension=%{_modname}.so
+EOF
 
 %clean
 rm -rf $RPM_BUILD_ROOT
 
 %post
-%{_sbindir}/php4-module-install install %{_modname} %{_sysconfdir}/php-cgi.ini
+[ ! -f /etc/apache/conf.d/??_mod_php4.conf ] || %service -q apache restart
+[ ! -f /etc/httpd/httpd.conf/??_mod_php4.conf ] || %service -q httpd restart
 
-%preun
-if [ "$1" = "0" ]; then
-	%{_sbindir}/php4-module-install remove %{_modname} %{_sysconfdir}/php-cgi.ini
+%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
 fi
 
 %files
 %defattr(644,root,root,755)
 %doc %{_modname}-%{version}/{CHANGELOG,INSTALL,NOTICE}
+%config(noreplace) %verify(not size mtime md5) %{_sysconfdir}/conf.d/%{_modname}.ini
 %attr(755,root,root) %{extensionsdir}/%{_modname}.so
 
 %define date	%(echo `LC_ALL="C" date +"%a %b %d %Y"`)
@@ -72,6 +79,9 @@
 All persons listed below can be reached at <cvs_login>@pld-linux.org
 
 $Log$
+Revision 1.5  2005/08/25 08:36:56  glen
+- use confdir php, rel 2
+
 Revision 1.4  2005/08/25 08:05:42  adamg
 - updated to 3.0.8
 
@@ -83,4 +93,3 @@
 
 Revision 1.1  2005/07/27 11:09:41  adamg
 - new (cp from php-pecl-APC.spec)
-
================================================================

---- CVS-web:
    http://cvs.pld-linux.org/SPECS/php4-pecl-APC.spec?r1=1.4&r2=1.5&f=u




More information about the pld-cvs-commit mailing list