SPECS: php-pecl-SQLite.spec - conf.d support. NOTE: doesn't build

glen glen at pld-linux.org
Mon Sep 12 01:19:50 CEST 2005


Author: glen                         Date: Sun Sep 11 23:19:50 2005 GMT
Module: SPECS                         Tag: HEAD
---- Log message:
- conf.d support. NOTE: doesn't build

---- Files affected:
SPECS:
   php-pecl-SQLite.spec (1.9 -> 1.10) 

---- Diffs:

================================================================
Index: SPECS/php-pecl-SQLite.spec
diff -u SPECS/php-pecl-SQLite.spec:1.9 SPECS/php-pecl-SQLite.spec:1.10
--- SPECS/php-pecl-SQLite.spec:1.9	Sun May 30 18:01:21 2004
+++ SPECS/php-pecl-SQLite.spec	Mon Sep 12 01:19:45 2005
@@ -1,7 +1,11 @@
 # $Revision$, $Date$
+# TODO
+# - doesn't build
 %define		_modname	SQLite
 %define		_status		stable
 %define		_smodname	sqlite
+%define		_sysconfdir	/etc/php
+%define		extensionsdir	%(php-config --extension-dir 2>/dev/null)
 
 Summary:	%{_modname} - database bindings
 Summary(pl):	%{_modname} - powiązania z bazą danych
@@ -13,15 +17,12 @@
 Source0:	http://pecl.php.net/get/%{_modname}-%{version}.tgz
 # Source0-md5:	a6ddfe1136e35ad7feddc9ce9bfac991
 URL:		http://pecl.php.net/package/SQLite/
-BuildRequires:	libtool
-BuildRequires:	php-devel
-Requires:	php-common
+BuildRequires:	php-devel >= 3:5.0.0
+%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
 %{_modname} is a C library that implements an embeddable SQL database
 engine. Programs that link with the %{_modname} library can have SQL
@@ -49,25 +50,35 @@
 
 %install
 rm -rf $RPM_BUILD_ROOT
-cd %{_modname}-%{version}
-chmod 755 build/shtool
-%{__make} install INSTALL_ROOT=$RPM_BUILD_ROOT
+install -d $RPM_BUILD_ROOT{%{_sysconfdir}/conf.d,%{extensionsdir}}
+
+#chmod 755 build/shtool
+%{__make} -C %{_modname}-%{version} install \
+	INSTALL_ROOT=$RPM_BUILD_ROOT
+
+cat <<'EOF' > $RPM_BUILD_ROOT%{_sysconfdir}/conf.d/%{_smodname}.ini
+; Enable %{_modname} extension module
+extension=%{_smodname}.so
+EOF
 
 %clean
 rm -rf $RPM_BUILD_ROOT
 
 %post
-%{_sbindir}/php-module-install install %{_smodname} %{_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 %{_smodname} %{_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}/README %{_modname}-%{version}/TODO %{_modname}-%{version}/CREDITS
 %doc %{_modname}-%{version}/sqlite.php %{_modname}-%{version}/tests
+%config(noreplace) %verify(not size mtime md5) %{_sysconfdir}/conf.d/%{_smodname}.ini
 %attr(755,root,root) %{extensionsdir}/%{_smodname}.so
 
 %define date	%(echo `LC_ALL="C" date +"%a %b %d %Y"`)
@@ -76,6 +87,9 @@
 All persons listed below can be reached at <cvs_login>@pld-linux.org
 
 $Log$
+Revision 1.10  2005/09/11 23:19:45  glen
+- conf.d support. NOTE: doesn't build
+
 Revision 1.9  2004/05/30 16:01:21  adamg
 - fixed english information about status of the package (also s/PEAR/PECL/)
 
================================================================

---- CVS-web:
    http://cvs.pld-linux.org/SPECS/php-pecl-SQLite.spec?r1=1.9&r2=1.10&f=u




More information about the pld-cvs-commit mailing list