[packages/php-pecl-haru] support building for multiple php versions

glen glen at pld-linux.org
Fri Jun 21 19:22:31 CEST 2013


commit a3981ff5eb897bc8d39d3e8feb2d0b39fd384454
Author: Elan Ruusamäe <glen at delfi.ee>
Date:   Fri Jun 21 20:18:37 2013 +0300

    support building for multiple php versions

 php-pecl-haru.spec | 33 +++++++++++++++++----------------
 1 file changed, 17 insertions(+), 16 deletions(-)
---
diff --git a/php-pecl-haru.spec b/php-pecl-haru.spec
index cb5ede2..e683bbf 100644
--- a/php-pecl-haru.spec
+++ b/php-pecl-haru.spec
@@ -1,18 +1,19 @@
-%define		_modname	haru
-%define		_status		stable
-Summary:	%{_modname} - Haru PDF functions
-Summary(pl.UTF-8):	%{_modname} - funkcje PDF haru
-Name:		php-pecl-%{_modname}
+%define		php_name	php%{?php_suffix}
+%define		modname	haru
+%define		status		stable
+Summary:	%{modname} - Haru PDF functions
+Summary(pl.UTF-8):	%{modname} - funkcje PDF haru
+Name:		%{php_name}-pecl-%{modname}
 Version:	1.0.3
 Release:	3
 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:	2e7f99d1ff4762ec42c37b6e00aa3872
 URL:		http://pecl.php.net/package/haru/
+BuildRequires:	%{php_name}-devel >= 3:5.0.0
 BuildRequires:	libharu-devel >= 2.0.8-2
-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,17 +22,17 @@ BuildRoot:	%{tmpdir}/%{name}-%{version}-root-%(id -u -n)
 This extensions allows you to create PDF documents using the Haru Free
 PDF Library.
 
-In PECL status of this extension is: %{_status}.
+In PECL status of this extension is: %{status}.
 
 %description -l pl.UTF-8
 Rozszerzenie to pozwala na tworzenie dokumentów PDF przy użyciu
 biblioteki Haru.
 
-To rozszerzenie ma w PECL status: %{_status}.
+To rozszerzenie ma w PECL status: %{status}.
 
 %prep
 %setup -q -c
-mv %{_modname}-%{version}/* .
+mv %{modname}-%{version}/* .
 
 %build
 phpize
@@ -45,9 +46,9 @@ install -d $RPM_BUILD_ROOT%{php_sysconfdir}/conf.d
 %{__make} install \
 	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
@@ -64,5 +65,5 @@ fi
 %files
 %defattr(644,root,root,755)
 %doc CREDITS
-%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-haru.git/commitdiff/a3981ff5eb897bc8d39d3e8feb2d0b39fd384454



More information about the pld-cvs-commit mailing list