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

glen glen at pld-linux.org
Fri Jun 21 19:24:40 CEST 2013


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

    support building for multiple php versions

 php-pecl-ncurses.spec | 46 +++++++++++++++++++++++-----------------------
 1 file changed, 23 insertions(+), 23 deletions(-)
---
diff --git a/php-pecl-ncurses.spec b/php-pecl-ncurses.spec
index 360cd14..55d2734 100644
--- a/php-pecl-ncurses.spec
+++ b/php-pecl-ncurses.spec
@@ -1,19 +1,20 @@
-%define		_modname	ncurses
-%define		_status		stable
-Summary:	%{_modname} - Terminal screen handling and optimization package
-Summary(pl.UTF-8):	%{_modname} - pakiet obsługi i optymalizacji terminala
-Name:		php-pecl-%{_modname}
+%define		php_name	php%{?php_suffix}
+%define		modname	ncurses
+%define		status		stable
+Summary:	%{modname} - Terminal screen handling and optimization package
+Summary(pl.UTF-8):	%{modname} - pakiet obsługi i optymalizacji terminala
+Name:		%{php_name}-pecl-%{modname}
 Version:	1.0.2
 Release:	3
 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:	a466d1b3e556cda67274ba6c36239c48
-Patch0:		%{name}-php52.patch
+Patch0:		php-pecl-%{modname}-php52.patch
 URL:		http://pecl.php.net/package/ncurses/
 BuildRequires:	ncurses-ext-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(core) >= 5.0.4
 Obsoletes:	php-ncurses
@@ -22,19 +23,19 @@ BuildRoot:	%{tmpdir}/%{name}-%{version}-root-%(id -u -n)
 %description
 This module adds support for ncurses functions (only for cli SAPI).
 
-In PECL status of this extension is: %{_status}.
+In PECL status of this extension is: %{status}.
 
 %description -l pl.UTF-8
 Ten moduł dodaje obsługę funkcji ncurses (tylko do SAPI cli).
 
-To rozszerzenie ma w PECL status: %{_status}.
+To rozszerzenie ma w PECL status: %{status}.
 
 %prep
-%setup -q -c
-%patch0 -p0
+%setup -qc
+mv %{modname}-%{version}/* .
+%patch0 -p1
 
 %build
-cd %{_modname}-%{version}
 phpize
 %configure
 %{__make}
@@ -42,13 +43,12 @@ phpize
 %install
 rm -rf $RPM_BUILD_ROOT
 install -d $RPM_BUILD_ROOT%{php_sysconfdir}/cli.d
-
-%{__make} -C %{_modname}-%{version} install \
-	INSTALL_ROOT=$RPM_BUILD_ROOT \
-	EXTENSION_DIR=%{php_extensiondir}
-cat <<'EOF' > $RPM_BUILD_ROOT%{php_sysconfdir}/cli.d/%{_modname}.ini
-; Enable %{_modname} extension module
-extension=%{_modname}.so
+%{__make} install \
+	EXTENSION_DIR=%{php_extensiondir} \
+	INSTALL_ROOT=$RPM_BUILD_ROOT
+cat <<'EOF' > $RPM_BUILD_ROOT%{php_sysconfdir}/cli.d/%{modname}.ini
+; Enable %{modname} extension module
+extension=%{modname}.so
 EOF
 
 %clean
@@ -56,5 +56,5 @@ rm -rf $RPM_BUILD_ROOT
 
 %files
 %defattr(644,root,root,755)
-%config(noreplace) %verify(not md5 mtime size) %{php_sysconfdir}/cli.d/%{_modname}.ini
-%attr(755,root,root) %{php_extensiondir}/%{_modname}.so
+%config(noreplace) %verify(not md5 mtime size) %{php_sysconfdir}/cli.d/%{modname}.ini
+%attr(755,root,root) %{php_extensiondir}/%{modname}.so
================================================================

---- gitweb:

http://git.pld-linux.org/gitweb.cgi/packages/php-pecl-ncurses.git/commitdiff/355d3d08896cf95716e623dac6b7ef18b920a717



More information about the pld-cvs-commit mailing list