commit 66c756020c16730a11a317e3b8a05d8de73144db
Author: Elan Ruusamäe <[email protected]>
Date:   Fri Jun 21 20:18:40 2013 +0300

    support building for multiple php versions

 php-pecl-pop3.spec | 42 +++++++++++++++++++++---------------------
 1 file changed, 21 insertions(+), 21 deletions(-)
---
diff --git a/php-pecl-pop3.spec b/php-pecl-pop3.spec
index a561bb9..c2c452b 100644
--- a/php-pecl-pop3.spec
+++ b/php-pecl-pop3.spec
@@ -1,22 +1,23 @@
-%define                _modname        pop3
-%define                _status         stable
+%define                php_name        php%{?php_suffix}
+%define                modname pop3
+%define                status          stable
 Summary:       POP3 Client Library
 Summary(pl.UTF-8):     Biblioteka klienta POP3
-Name:          php-pecl-%{_modname}
+Name:          %{php_name}-pecl-%{modname}
 Version:       1.0.2
 Release:       8
 License:       PHP
 Group:         Development/Languages/PHP
-Source0:       http://pecl.php.net/get/%{_modname}-%{version}.tgz
+Source0:       http://pecl.php.net/get/%{modname}-%{version}.tgz
 # Source0-md5: cdbe4f41aa37bcf45e651d5568f3a8d2
-Patch0:                %{name}-php51.patch
+Patch0:                php-pecl-%{modname}-php51.patch
 URL:           http://pecl.php.net/package/POP3/
 BuildRequires: libspopc-devel
-BuildRequires: php-devel >= 3:5.0.0
-BuildRequires: rpmbuild(macros) >= 1.344
+BuildRequires: %{php_name}-devel >= 3:5.0.0
+BuildRequires: rpmbuild(macros) >= 1.650
 %{?requires_php_extension}
 Requires:      php-common >= 4:5.0.4
-Obsoletes:     php-pear-%{_modname}
+Obsoletes:     php-pear-%{modname}
 BuildRoot:     %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
 
 %description
@@ -25,7 +26,7 @@ and interact with a POP3 mail server. Based on libspopc
 (http://brouits.free.fr/libspopc/), it is built for performance and
 ease of use.
 
-In PECL status of this package is: %{_status}.
+In PECL status of this package is: %{status}.
 
 %description -l pl.UTF-8
 Rozszerzenie POP3 umożliwia skryptowi PHP podłączenie i współpracę z
@@ -33,14 +34,14 @@ serwerem POP3. Biblioteka bazująca na libspopc
 (http://brouits.free.fr/libspopc/), stworzona została z myślą o
 wydajności i łatwości użycia.
 
-To rozszerzenie ma w PECL status: %{_status}.
+To rozszerzenie ma w PECL status: %{status}.
 
 %prep
-%setup -q -c
-%patch0 -p1
+%setup -qc
+mv %{modname}-%{version}/* .
+%patch0 -p2
 
 %build
-cd %{_modname}-%{version}
 phpize
 %configure
 %{__make}
@@ -48,11 +49,10 @@ phpize
 %install
 rm -rf $RPM_BUILD_ROOT
 install -d $RPM_BUILD_ROOT{%{php_sysconfdir}/conf.d,%{php_extensiondir}}
-
-install %{_modname}-%{version}/modules/%{_modname}.so 
$RPM_BUILD_ROOT%{php_extensiondir}
-cat <<'EOF' > $RPM_BUILD_ROOT%{php_sysconfdir}/conf.d/%{_modname}.ini
-; Enable %{_modname} extension module
-extension=%{_modname}.so
+install -p modules/%{modname}.so $RPM_BUILD_ROOT%{php_extensiondir}
+cat <<'EOF' > $RPM_BUILD_ROOT%{php_sysconfdir}/conf.d/%{modname}.ini
+; Enable %{modname} extension module
+extension=%{modname}.so
 EOF
 
 %clean
@@ -68,6 +68,6 @@ fi
 
 %files
 %defattr(644,root,root,755)
-%doc %{_modname}-%{version}/{CREDITS,EXPERIMENTAL}
-%config(noreplace) %verify(not md5 mtime size) 
%{php_sysconfdir}/conf.d/%{_modname}.ini
-%attr(755,root,root) %{php_extensiondir}/%{_modname}.so
+%doc CREDITS EXPERIMENTAL
+%config(noreplace) %verify(not md5 mtime size) 
%{php_sysconfdir}/conf.d/%{modname}.ini
+%attr(755,root,root) %{php_extensiondir}/%{modname}.so
================================================================

---- gitweb:

http://git.pld-linux.org/gitweb.cgi/packages/php-pecl-pop3.git/commitdiff/66c756020c16730a11a317e3b8a05d8de73144db

_______________________________________________
pld-cvs-commit mailing list
[email protected]
http://lists.pld-linux.org/mailman/listinfo/pld-cvs-commit

Reply via email to