[packages/php-pecl-lzf] support building for multiple php versions
glen
glen at pld-linux.org
Fri Jun 21 19:23:42 CEST 2013
commit 1b54402ac66eb2748dd88c73b6b882d3ad77fc5a
Author: Elan Ruusamäe <glen at delfi.ee>
Date: Fri Jun 21 20:18:38 2013 +0300
support building for multiple php versions
php-pecl-lzf.spec | 39 ++++++++++++++++++++-------------------
1 file changed, 20 insertions(+), 19 deletions(-)
---
diff --git a/php-pecl-lzf.spec b/php-pecl-lzf.spec
index 7d3a66b..d3bd7af 100644
--- a/php-pecl-lzf.spec
+++ b/php-pecl-lzf.spec
@@ -1,40 +1,41 @@
# TODO
# - use system liblzf
-%define _modname lzf
-%define _modname_c LZF
-%define _status stable
-Summary: %{_modname} - (de)compression
-Summary(pl.UTF-8): %{_modname} - (de)kompresja
-Name: php-pecl-%{_modname}
+%define php_name php%{?php_suffix}
+%define modname lzf
+%define modname_c LZF
+%define status stable
+Summary: %{modname} - (de)compression
+Summary(pl.UTF-8): %{modname} - (de)kompresja
+Name: %{php_name}-pecl-%{modname}
Version: 1.5.2
Release: 5
License: PHP 3.01
Group: Development/Languages/PHP
-Source0: http://pecl.php.net/get/%{_modname}-%{version}.tgz
+Source0: http://pecl.php.net/get/%{modname}-%{version}.tgz
# Source0-md5: d0313d93783cd11c8e038abfcf1b4f91
URL: http://pecl.php.net/package/LZF/
-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(core) >= 5.0.4
-Obsoletes: php-pear-%{_modname}
+Obsoletes: php-pear-%{modname}
BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
%description
This package handles LZF de/compression.
-In PECL status of this package is: %{_status}.
+In PECL status of this package is: %{status}.
%description -l pl.UTF-8
Ten pakiet dostarczaj obsługę (de)kompresji archiwów LZF.
-To rozszerzenie ma w PECL status: %{_status}.
+To rozszerzenie ma w PECL status: %{status}.
%prep
%setup -q -c
%build
-cd %{_modname_c}-%{version}
+cd %{modname_c}-%{version}
phpize
%configure \
--enable-lzf
@@ -44,10 +45,10 @@ phpize
rm -rf $RPM_BUILD_ROOT
install -d $RPM_BUILD_ROOT{%{php_sysconfdir}/conf.d,%{php_extensiondir}}
-install %{_modname_c}-%{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 %{modname_c}-%{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
EOF
%clean
@@ -63,5 +64,5 @@ fi
%files
%defattr(644,root,root,755)
-%config(noreplace) %verify(not md5 mtime size) %{php_sysconfdir}/conf.d/%{_modname}.ini
-%attr(755,root,root) %{php_extensiondir}/%{_modname}.so
+%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-lzf.git/commitdiff/1b54402ac66eb2748dd88c73b6b882d3ad77fc5a
More information about the pld-cvs-commit
mailing list