[packages/php-pecl-ares] support building for multiple php versions
glen
glen at pld-linux.org
Fri Jun 21 19:19:28 CEST 2013
commit af867f483338e58e17b3b11164ba911b0b15128d
Author: Elan Ruusamäe <glen at delfi.ee>
Date: Fri Jun 21 20:18:27 2013 +0300
support building for multiple php versions
php-pecl-ares.spec | 43 +++++++++++++++++++++----------------------
1 file changed, 21 insertions(+), 22 deletions(-)
---
diff --git a/php-pecl-ares.spec b/php-pecl-ares.spec
index fd3c838..c50e3c0 100644
--- a/php-pecl-ares.spec
+++ b/php-pecl-ares.spec
@@ -1,19 +1,20 @@
-%define _modname ares
-%define _status beta
-Summary: %{_modname} - asynchronous resolver
-Summary(pl.UTF-8): %{_modname} - asynchroniczny resolver
-Name: php-pecl-%{_modname}
+%define php_name php%{?php_suffix}
+%define modname ares
+%define status beta
+Summary: %{modname} - asynchronous resolver
+Summary(pl.UTF-8): %{modname} - asynchroniczny resolver
+Name: %{php_name}-pecl-%{modname}
Version: 0.7.0
Release: 5
License: BSD, revised
Group: Development/Languages/PHP
-Source0: http://pecl.php.net/get/%{_modname}-%{version}.tgz
+Source0: http://pecl.php.net/get/%{modname}-%{version}.tgz
# Source0-md5: 24ec2e3089246bab68d01af9c93a1dc7
-Patch0: %{name}-tsrm.patch
+Patch0: php-pecl-%{modname}-tsrm.patch
URL: http://pecl.php.net/package/ares/
+BuildRequires: %{php_name}-devel >= 3:5.0.0
BuildRequires: c-ares-devel
-BuildRequires: php-devel >= 3:5.0.0
-BuildRequires: rpmbuild(macros) >= 1.344
+BuildRequires: rpmbuild(macros) >= 1.650
%{?requires_php_extension}
Requires: php(core) >= 5.0.4
BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
@@ -21,19 +22,19 @@ BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
%description
Binding for the ares (MIT) or c-ares (CURL) library.
-In PECL status of this extension is: %{_status}.
+In PECL status of this extension is: %{status}.
%description -l pl.UTF-8
Dowiązania do biblioteki ares (MIT) lub c-ares (CURL).
-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}
@@ -41,15 +42,13 @@ phpize
%install
rm -rf $RPM_BUILD_ROOT
install -d $RPM_BUILD_ROOT%{php_sysconfdir}/conf.d
-
%{__make} install \
- -C %{_modname}-%{version} \
INSTALL_ROOT=$RPM_BUILD_ROOT \
EXTENSION_DIR=%{php_extensiondir}
-cat <<'EOF' > $RPM_BUILD_ROOT%{php_sysconfdir}/conf.d/%{_modname}.ini
-; Enable %{_modname} extension module
-extension=%{_modname}.so
+cat <<'EOF' > $RPM_BUILD_ROOT%{php_sysconfdir}/conf.d/%{modname}.ini
+; Enable %{modname} extension module
+extension=%{modname}.so
EOF
%clean
@@ -65,6 +64,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-ares.git/commitdiff/af867f483338e58e17b3b11164ba911b0b15128d
More information about the pld-cvs-commit
mailing list