]> git.pld-linux.org Git - packages/php-pecl-APC.git/commitdiff
- full conf.d support and unifications
authorElan Ruusamäe <glen@pld-linux.org>
Sun, 11 Sep 2005 23:53:22 +0000 (23:53 +0000)
committercvs2git <feedback@pld-linux.org>
Sun, 24 Jun 2012 12:13:13 +0000 (12:13 +0000)
Changed files:
    php-pecl-APC.spec -> 1.10

php-pecl-APC.spec

index 3f955cb3529631a0b6e4eee4d40904cfa512ee6f..8e536cfdc5b0806fbb1eebb2de3f42000fe816c8 100644 (file)
@@ -1,25 +1,25 @@
 %define                _modname        APC
 %define                _status         stable
+%define                _sysconfdir     /etc/php
+%define                extensionsdir   %(php-config --extension-dir 2>/dev/null)
 
 Summary:       %{_modname} - Alternative PHP Cache
 Summary(pl):   %{_modname} - alternatywne cache PHP
 Name:          php-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
 # Source0-md5: a70a14a00275e551e8085f742322433f
 URL:           http://pecl.php.net/package/APC/
-BuildRequires: libtool
-BuildRequires: php-devel
-Requires:      php-common
+BuildRequires: php-devel >= 3:5.0.0
+BuildRequires: rpmbuild(macros) >= 1.230
+%requires_eq_to php-common php-devel
+Requires:      %{_sysconfdir}/conf.d
 Obsoletes:     php-pear-%{_modname}
 BuildRoot:     %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
 
-%define                _sysconfdir     /etc/php
-%define                extensionsdir   %{_libdir}/php
-
 %description
 APC is the Alternative PHP Cache. It was conceived of to provide a
 free, open, and robust framework for caching and optimizing PHP
@@ -45,22 +45,29 @@ phpize
 
 %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}/php-module-install install %{_modname} %{_sysconfdir}/php-cgi.ini
+[ ! -f /etc/apache/conf.d/??_mod_php.conf ] || %service -q apache restart
+[ ! -f /etc/httpd/httpd.conf/??_mod_php.conf ] || %service -q httpd restart
 
-%preun
-if [ "$1" = "0" ]; then
-       %{_sbindir}/php-module-install remove %{_modname} %{_sysconfdir}/php-cgi.ini
+%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
 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
This page took 0.04 seconds and 4 git commands to generate.