SPECS: php-pecl-esmtp.spec - added conf.d, add php api version req...
glen
glen at pld-linux.org
Wed Sep 14 00:53:02 CEST 2005
Author: glen Date: Tue Sep 13 22:53:02 2005 GMT
Module: SPECS Tag: HEAD
---- Log message:
- added conf.d, add php api version require
- note ./configure broken on i686 without a reason and can't find how to fix it (lame patch on generated configure added)
---- Files affected:
SPECS:
php-pecl-esmtp.spec (1.7 -> 1.8)
---- Diffs:
================================================================
Index: SPECS/php-pecl-esmtp.spec
diff -u SPECS/php-pecl-esmtp.spec:1.7 SPECS/php-pecl-esmtp.spec:1.8
--- SPECS/php-pecl-esmtp.spec:1.7 Tue Sep 13 23:16:43 2005
+++ SPECS/php-pecl-esmtp.spec Wed Sep 14 00:52:56 2005
@@ -1,26 +1,29 @@
# $Revision$, $Date$
%define _modname esmtp
%define _status alpha
+%define _sysconfdir /etc/php
+%define extensionsdir %(php-config --extension-dir 2>/dev/null)
Summary: %{_modname} - ESMTP client extension
Summary(pl): %{_modname} - klient ESMTP
Name: php-pecl-%{_modname}
Version: 0.3.1
-Release: 2
+Release: 2.1
License: PHP 2.02
Group: Development/Languages/PHP
Source0: http://pecl.php.net/get/%{_modname}-%{version}.tgz
# Source0-md5: e1db69e1b05efd0bf7f5c7d0b6b3255f
+Patch0: %{name}-pthreads.patch
+Patch1: %{name}-dlfcn.patch
URL: http://pecl.php.net/package/esmtp/
BuildRequires: libesmtp-devel >= 1.0.3r1
BuildRequires: php-devel >= 3:5.0.0
-Requires: php-common >= 3:5.0.0
+BuildRequires: rpmbuild(macros) >= 1.238
+%requires_php_extension
+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
Esmtp is a wrapper for SMTP client library based on the libESMTP
library (http://www.stafford.uklinux.net/libesmtp/). You can use it to
@@ -38,34 +41,55 @@
%prep
%setup -q -c
+cd %{_modname}-%{version}
+%patch0 -p1
%build
cd %{_modname}-%{version}
phpize
+
+# i have no damn clue, how to fix it "properly", but it's causing
+# shell syntax error and therefore dlfcn.h header is undetected:
+#configure:5021: result: no
+#configure:5047: checking dlfcn.h usability
+#configure:5060: gcc -c -g -O2 -pthread conftest.c >&5
+#configure:5066: $? = 0
+#configure:5070: test -z
+#./configure: syntax error: `||' unexpected
+#configure:5073: $? = 1
+# so, therefore the patch.
+patch -p1 < %{PATCH1}
%configure
%{__make} \
CFLAGS="%{rpmcflags} -fPIC"
%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/%{_modname}.so $RPM_BUILD_ROOT%{extensionsdir}
+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}/{CREDITS,EXPERIMENTAL,NOTES,TODO}
+%config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/conf.d/%{_modname}.ini
%attr(755,root,root) %{extensionsdir}/%{_modname}.so
%define date %(echo `LC_ALL="C" date +"%a %b %d %Y"`)
@@ -74,6 +98,10 @@
All persons listed below can be reached at <cvs_login>@pld-linux.org
$Log$
+Revision 1.8 2005/09/13 22:52:56 glen
+- added conf.d, add php api version require
+- note ./configure broken on i686 without a reason and can't find how to fix it (lame patch on generated configure added)
+
Revision 1.7 2005/09/13 21:16:43 glen
- superfluous BR libtool removed
================================================================
---- CVS-web:
http://cvs.pld-linux.org/SPECS/php-pecl-esmtp.spec?r1=1.7&r2=1.8&f=u
More information about the pld-cvs-commit
mailing list