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

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


commit d35d21d973e4d550ed3769774a5029178b6cef18
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-fribidi.spec | 45 +++++++++++++++++++++++----------------------
 1 file changed, 23 insertions(+), 22 deletions(-)
---
diff --git a/php-pecl-fribidi.spec b/php-pecl-fribidi.spec
index 67f73d0..0848d90 100644
--- a/php-pecl-fribidi.spec
+++ b/php-pecl-fribidi.spec
@@ -1,44 +1,45 @@
-%define		_modname	fribidi
-%define		_status		stable
-Summary:	%{_modname} - Implementation of the Unicode BiDi algorithm
-Summary(pl.UTF-8):	%{_modname} - Implementacja algorytmu BiDi Unicode
-Name:		php-pecl-%{_modname}
+%define		php_name	php%{?php_suffix}
+%define		modname	fribidi
+%define		status		stable
+Summary:	%{modname} - Implementation of the Unicode BiDi algorithm
+Summary(pl.UTF-8):	%{modname} - Implementacja algorytmu BiDi Unicode
+Name:		%{php_name}-pecl-%{modname}
 Version:	1.0
 Release:	7
 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:	360e55f049cdebc96fe797eba78399ef
-Patch0:		%{name}-new_fribidi.patch
+Patch0:		php-pecl-%{modname}-new_fribidi.patch
 URL:		http://pecl.php.net/package/fribidi/
+BuildRequires:	%{php_name}-devel >= 3:5.0.0
 BuildRequires:	fribidi-devel >= 0.10.9
-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-fribidi
-Obsoletes:	php-pear-%{_modname}
+Obsoletes:	php-pear-%{modname}
 BuildRoot:	%{tmpdir}/%{name}-%{version}-root-%(id -u -n)
 
 %description
 A PHP frontend to the FriBidi library: an implemntation of the unicode
 Bidi algorithm, provides means of handling right-to-left text.
 
-In PECL status of this package is: %{_status}.
+In PECL status of this package is: %{status}.
 
 %description -l pl.UTF-8
 Frontend PHP do biblioteki FriBidi: implementacji algorytmu unicode
 Bidi, dostarczającego środki do obsługi tekstu pisanego od prawej do
 lewej.
 
-To rozszerzenie ma w PECL status: %{_status}.
+To rozszerzenie ma w PECL status: %{status}.
 
 %prep
-%setup -q -c
-%patch0 -p1
+%setup -qc
+mv %{modname}-%{version}/* .
+%patch0 -p2
 
 %build
-cd %{_modname}-%{version}
 phpize
 %configure
 %{__make}
@@ -47,10 +48,10 @@ phpize
 rm -rf $RPM_BUILD_ROOT
 install -d $RPM_BUILD_ROOT{%{php_sysconfdir}/conf.d,%{php_extensiondir}}
 
-install %{_modname}-%{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 -p 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
@@ -66,5 +67,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-fribidi.git/commitdiff/d35d21d973e4d550ed3769774a5029178b6cef18



More information about the pld-cvs-commit mailing list