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

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


commit 137e2a1ac56c9a634cb96b1528b18343c6964355
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-fam.spec | 39 +++++++++++++++++++--------------------
 1 file changed, 19 insertions(+), 20 deletions(-)
---
diff --git a/php-pecl-fam.spec b/php-pecl-fam.spec
index ef253c2..cd0baea 100644
--- a/php-pecl-fam.spec
+++ b/php-pecl-fam.spec
@@ -1,20 +1,21 @@
-%define		_modname	fam
-%define		_status		beta
-Summary:	%{_modname} - File Alteration Monitor Functions
-Summary(pl.UTF-8):	%{_modname} - monitor zmian w plikach
-Name:		php-pecl-%{_modname}
+%define		php_name	php%{?php_suffix}
+%define		modname	fam
+%define		status		beta
+Summary:	%{modname} - File Alteration Monitor Functions
+Summary(pl.UTF-8):	%{modname} - monitor zmian w plikach
+Name:		%{php_name}-pecl-%{modname}
 Version:	5.0.1
 Release:	3
 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:	2a5e358e7fec4f3b21610423a2652934
 URL:		http://pecl.php.net/package/fam/
+BuildRequires:	%{php_name}-devel >= 3:5.0.0
 BuildRequires:	fam-devel
-BuildRequires:	php-devel >= 3:5.0.0
-BuildRequires:	rpmbuild(macros) >= 1.344
+BuildRequires:	rpmbuild(macros) >= 1.650
 %{?requires_php_extension}
-Requires:	php-common >= 4:5.0.4
+Requires:	php(core) >= 5.0.4
 Obsoletes:	php-fam
 BuildRoot:	%{tmpdir}/%{name}-%{version}-root-%(id -u -n)
 
@@ -25,7 +26,7 @@ monitor using the functions provided by this extension. The FAM
 process is started when the first connection from any application to
 it is opened. It exits after all connections to it have been closed.
 
-In PECL status of this extension is: %{_status}.
+In PECL status of this extension is: %{status}.
 
 %description -l pl.UTF-8
 FAM monitoruje pliki i katalogi, informując aplikacje o występujących
@@ -34,13 +35,13 @@ plików jakie FAM ma monitorować. Proces FAM jest uruchomiony gdy
 pojawi się pierwsze połączenie, a kończony w momencie odłaczenia się
 ostatniej aplikacji.
 
-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}
@@ -48,14 +49,12 @@ 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
@@ -71,5 +70,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-fam.git/commitdiff/137e2a1ac56c9a634cb96b1528b18343c6964355



More information about the pld-cvs-commit mailing list