[packages/php-pecl-amfext] support building for multiple php versions
glen
glen at pld-linux.org
Fri Jun 21 19:19:17 CEST 2013
commit 5361d677948cf2491f968667f52bc4eecacc0e69
Author: Elan Ruusamäe <glen at delfi.ee>
Date: Fri Jun 21 20:18:21 2013 +0300
support building for multiple php versions
php-pecl-amfext.spec | 43 +++++++++++++++++++++----------------------
1 file changed, 21 insertions(+), 22 deletions(-)
---
diff --git a/php-pecl-amfext.spec b/php-pecl-amfext.spec
index bf8b25e..8f8d8b7 100644
--- a/php-pecl-amfext.spec
+++ b/php-pecl-amfext.spec
@@ -1,38 +1,39 @@
-%define _modname amfext
-%define _status beta
-Summary: %{_modname} - ActionScript Message Format extension
-Summary(pl.UTF-8): %{_modname} - rozszerzenie ActionScript Message Format
-Name: php-pecl-%{_modname}
+%define php_name php%{?php_suffix}
+%define modname amfext
+%define status beta
+Summary: %{modname} - ActionScript Message Format extension
+Summary(pl.UTF-8): %{modname} - rozszerzenie ActionScript Message Format
+Name: %{php_name}-pecl-%{modname}
Version: 0.9.2
Release: 1
License: PHP 2.02
Group: Development/Languages/PHP
-Source0: http://pecl.php.net/get/%{_modname}-%{version}.tgz
+Source0: http://pecl.php.net/get/%{modname}-%{version}.tgz
# Source0-md5: c5899ca580f19ef7f057b6ea41c2d236
URL: http://pecl.php.net/package/amfext/
-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
+Requires: php(core) >= 5.0.4
BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
%description
Allows to encode and decode PHP data in ActionScript Message Format
(AMF) version 0 and 3.
-In PECL status of this extension is: %{_status}.
+In PECL status of this extension is: %{status}.
%description -l pl.UTF-8
Rozszerzenie to pozwala (de)kodowanie danych PHP do formatu
ActionScript Message Format (AMF) w wersji 0 i 3.
-To rozszerzenie ma w PECL status: %{_status}.
+To rozszerzenie ma w PECL status: %{status}.
%prep
-%setup -q -c
+%setup -qc
+mv %{modname}-%{version}/* .
%build
-cd %{_modname}-%{version}
phpize
%configure
%{__make}
@@ -40,17 +41,15 @@ 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
-mv -f $RPM_BUILD_ROOT%{php_extensiondir}/{amf,%{_modname}}.so
+mv -f $RPM_BUILD_ROOT%{php_extensiondir}/{amf,%{modname}}.so
%clean
rm -rf $RPM_BUILD_ROOT
@@ -65,6 +64,6 @@ fi
%files
%defattr(644,root,root,755)
-%doc %{_modname}-%{version}/{CREDITS,README}
-%config(noreplace) %verify(not md5 mtime size) %{php_sysconfdir}/conf.d/%{_modname}.ini
-%attr(755,root,root) %{php_extensiondir}/%{_modname}.so
+%doc CREDITS README
+%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-amfext.git/commitdiff/5361d677948cf2491f968667f52bc4eecacc0e69
More information about the pld-cvs-commit
mailing list