SPECS: php-xerces.spec - conf.d and php api version support; doesn...
glen
glen at pld-linux.org
Thu Sep 15 20:49:42 CEST 2005
Author: glen Date: Thu Sep 15 18:49:42 2005 GMT
Module: SPECS Tag: HEAD
---- Log message:
- conf.d and php api version support; doesn't compile anyway
---- Files affected:
SPECS:
php-xerces.spec (1.9 -> 1.10)
---- Diffs:
================================================================
Index: SPECS/php-xerces.spec
diff -u SPECS/php-xerces.spec:1.9 SPECS/php-xerces.spec:1.10
--- SPECS/php-xerces.spec:1.9 Wed Sep 7 16:17:31 2005
+++ SPECS/php-xerces.spec Thu Sep 15 20:49:37 2005
@@ -1,9 +1,15 @@
# $Revision$, $Date$
+# TODO
+# - doesn't compile
+%define _modname xerces
+%define _sysconfdir /etc/php
+%define extensionsdir %(php-config --extension-dir 2>/dev/null)
+
Summary: PHP XML Parser with validation
Summary(pl): Analizator XML-a z kontrolą poprawności dla PHP
Name: php-xerces
Version: 0.8
-Release: 1
+Release: 1.1
License: Apache
Group: Libraries
Source0: http://ggodlewski.host.sk/download/php-xerces/%{name}-%{version}.tar.gz
@@ -12,12 +18,12 @@
BuildRequires: autoconf
BuildRequires: automake
BuildRequires: libtool
-BuildRequires: php-devel
+BuildRequires: php-devel >= 3:5.0.0
+BuildRequires: rpmbuild(macros) >= 1.238
BuildRequires: xerces-c-devel
+%{?requires_php_extension}
BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
-%define _sysconfdir /etc/php
-
%description
This extension lets you create XML parsers and then define handlers
for different XML events. It can also validate documents with DTD and
@@ -46,24 +52,34 @@
%install
rm -rf $RPM_BUILD_ROOT
+install -d $RPM_BUILD_ROOT%{_sysconfdir}/conf.d
+
%{__make} install \
DESTDIR=$RPM_BUILD_ROOT
+cat <<'EOF' > $RPM_BUILD_ROOT%{_sysconfdir}/conf.d/%{_modname}.ini
+; Enable %{_modname} extension module
+extension=%{_modname}.so
+EOF
+
%clean
rm -rf $RPM_BUILD_ROOT
-%preun
-if [ "$1" = "0" ]; then
- %{_sbindir}/php-module-install remove xerces %{_sysconfdir}/php.ini
-fi
-
%post
-%{_sbindir}/php-module-install install xerces %{_sysconfdir}/php.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
+
+%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 AUTHORS ChangeLog README TODO
-%attr(755,root,root) %{_libdir}/php/xerces.so
+%config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/conf.d/%{_name}.ini
+%attr(755,root,root) %{extensionsdir}/xerces.so
%define date %(echo `LC_ALL="C" date +"%a %b %d %Y"`)
%changelog
@@ -71,6 +87,9 @@
All persons listed below can be reached at <cvs_login>@pld-linux.org
$Log$
+Revision 1.10 2005/09/15 18:49:37 glen
+- conf.d and php api version support; doesn't compile anyway
+
Revision 1.9 2005/09/07 14:17:31 glen
- autotools called directly, revert last change
================================================================
---- CVS-web:
http://cvs.pld-linux.org/SPECS/php-xerces.spec?r1=1.9&r2=1.10&f=u
More information about the pld-cvs-commit
mailing list