SPECS: odbtp.spec - conf.d and php api to php-odbtp package. - TOD...
glen
glen at pld-linux.org
Thu Sep 15 20:03:38 CEST 2005
Author: glen Date: Thu Sep 15 18:03:38 2005 GMT
Module: SPECS Tag: HEAD
---- Log message:
- conf.d and php api to php-odbtp package.
- TODO: what about php-pecl-odbtp (hawk?)
---- Files affected:
SPECS:
odbtp.spec (1.12 -> 1.13)
---- Diffs:
================================================================
Index: SPECS/odbtp.spec
diff -u SPECS/odbtp.spec:1.12 SPECS/odbtp.spec:1.13
--- SPECS/odbtp.spec:1.12 Wed Sep 7 16:13:37 2005
+++ SPECS/odbtp.spec Thu Sep 15 20:03:33 2005
@@ -1,11 +1,11 @@
# $Revision$, $Date$
-%define php_ver %(rpm -q --qf '%%{epoch}:%%{version}' php-devel)
-
+# TODO
+# - what about php-pecl-odbtp? one of php-odbtp or php-pecl-odbtp must die
Summary: Accessing win32-based databases using TCP/IP protocol
Summary(pl): Dostęp do baz danych opartych na win32 za pomocą protokołu TCP/IP
Name: odbtp
Version: 1.1.2
-Release: 3
+Release: 3.1
License: LGPL
Group: Libraries
Source0: http://dl.sourceforge.net/%{name}/%{name}-%{version}.tar.gz
@@ -18,6 +18,7 @@
BuildRequires: automake
BuildRequires: libtool
BuildRequires: php-devel
+BuildRequires: rpmbuild(macros) >= 1.238
BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
%description
@@ -63,8 +64,7 @@
Summary(pl): Moduł odbtp (ze wsparciem dla MSSQL) dla PHP
Group: Libraries
Requires: %{name} = %{version}-%{release}
-Requires: php = %{php_ver}
-Requires(post,preun): php-common >= 4.1
+%{?requires_php_extension}
Obsoletes: php-pear-DB_odbtp
Obsoletes: php-pecl-odbtp
@@ -110,10 +110,13 @@
install libodbtp.so $RPM_BUILD_ROOT%{_libdir}
-install -d $RPM_BUILD_ROOT%{_libdir}/php
-install -d $RPM_BUILD_ROOT%{_sysconfdir}/%{name}
+install -d $RPM_BUILD_ROOT{%{_sysconfdir}/%{name},%{_sysconfdir}/php/conf.d,%{_libdir}/php}
install php/ext/%{name}/modules/%{name}.so $RPM_BUILD_ROOT%{_libdir}/php
install examples/odbtp.conf $RPM_BUILD_ROOT%{_sysconfdir}/%{name}
+cat <<'EOF' > $RPM_BUILD_ROOT%{_sysconfdir}/php/conf.d/odbtp.ini
+; Enable ODBTP extension module
+extension=odbtp.so
+EOF
%clean
rm -rf $RPM_BUILD_ROOT
@@ -122,11 +125,13 @@
%postun -p /sbin/ldconfig
%post -n php-%{name}
-%{_sbindir}/php-module-install install odbtp %{_sysconfdir}/php/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
-%preun -n php-%{name}
-if [ "$1" = "0" ]; then
- %{_sbindir}/php-module-install remove odbtp %{_sysconfdir}/php/php.ini
+%postun -n php-%{name}
+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
@@ -147,6 +152,7 @@
%files -n php-%{name}
%defattr(644,root,root,755)
%attr(755,root,root) %{_libdir}/php/odbtp.so
+%config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/php/conf.d/odbtp.ini
%config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/odbtp/odbtp.conf
%define date %(echo `LC_ALL="C" date +"%a %b %d %Y"`)
@@ -155,6 +161,10 @@
All persons listed below can be reached at <cvs_login>@pld-linux.org
$Log$
+Revision 1.13 2005/09/15 18:03:33 glen
+- conf.d and php api to php-odbtp package.
+- TODO: what about php-pecl-odbtp (hawk?)
+
Revision 1.12 2005/09/07 14:13:37 glen
- autotools called directly, revert last change
================================================================
---- CVS-web:
http://cvs.pld-linux.org/SPECS/odbtp.spec?r1=1.12&r2=1.13&f=u
More information about the pld-cvs-commit
mailing list