SPECS: php-rrdtool.spec - use new php extension macros
glen
glen at pld-linux.org
Tue Dec 26 21:36:03 CET 2006
Author: glen Date: Tue Dec 26 20:36:03 2006 GMT
Module: SPECS Tag: HEAD
---- Log message:
- use new php extension macros
---- Files affected:
SPECS:
php-rrdtool.spec (1.14 -> 1.15)
---- Diffs:
================================================================
Index: SPECS/php-rrdtool.spec
diff -u SPECS/php-rrdtool.spec:1.14 SPECS/php-rrdtool.spec:1.15
--- SPECS/php-rrdtool.spec:1.14 Fri Nov 3 00:09:09 2006
+++ SPECS/php-rrdtool.spec Tue Dec 26 21:35:57 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.2
-Release: 1
+Release: 2
License: GPL
Group: Applications/Databases
Source0: http://people.ee.ethz.ch/~oetiker/webtools/rrdtool/pub/contrib/php_rrdtool.tgz
@@ -17,7 +15,7 @@
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
@@ -42,12 +40,12 @@
%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
@@ -56,19 +54,17 @@
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
%define date %(echo `LC_ALL="C" date +"%a %b %d %Y"`)
%changelog
@@ -76,6 +72,9 @@
All persons listed below can be reached at <cvs_login>@pld-linux.org
$Log$
+Revision 1.15 2006/12/26 20:35:57 glen
+- use new php extension macros
+
Revision 1.14 2006/11/02 23:09:09 glen
- BR rpmmacros for fixed %requires_php_extension
================================================================
---- CVS-web:
http://cvs.pld-linux.org/SPECS/php-rrdtool.spec?r1=1.14&r2=1.15&f=u
More information about the pld-cvs-commit
mailing list