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

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


commit 882c2840ed8bf4901236e59514bc17fd17ab240b
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-mdbtools.spec | 43 +++++++++++++++++++++----------------------
 1 file changed, 21 insertions(+), 22 deletions(-)
---
diff --git a/php-pecl-mdbtools.spec b/php-pecl-mdbtools.spec
index 7355a69..be2982d 100644
--- a/php-pecl-mdbtools.spec
+++ b/php-pecl-mdbtools.spec
@@ -1,19 +1,20 @@
-%define		_modname	mdbtools
-%define		_status		stable
-Summary:	%{_modname} - MDB data file access library
-Summary(pl.UTF-8):	%{_modname} - biblioteka dostępu do plików MDB
-Name:		php-pecl-%{_modname}
+%define		php_name	php%{?php_suffix}
+%define		modname		mdbtools
+%define		status		stable
+Summary:	%{modname} - MDB data file access library
+Summary(pl.UTF-8):	%{modname} - biblioteka dostępu do plików MDB
+Name:		%{php_name}-pecl-%{modname}
 Version:	1.0.0
 Release:	8
 License:	LGPL
 Group:		Development/Languages/PHP
-Source0:	http://pecl.php.net/get/%{_modname}-%{version}.tgz
+Source0:	http://pecl.php.net/get/%{modname}-%{version}.tgz
 # Source0-md5:	758f844257c50dbd07c2b9a67a83954b
-Patch0:		%{name}-paths.patch
+Patch0:		php-pecl-%{modname}-paths.patch
 URL:		http://pecl.php.net/package/mdbtools/
 BuildRequires:	mdbtools-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
 BuildRoot:	%{tmpdir}/%{name}-%{version}-root-%(id -u -n)
@@ -22,21 +23,21 @@ BuildRoot:	%{tmpdir}/%{name}-%{version}-root-%(id -u -n)
 mdbtools provides read access to MDB data files as used by Microsoft
 Access and its underlying JetEngine.
 
-In PECL status of this extension is: %{_status}.
+In PECL status of this extension is: %{status}.
 
 %description -l pl.UTF-8
 mdbtools udostępnia możliwość odczytu danych zapisanych w plikach MDB,
 z których korzysta baza danych Microsoft Access oraz zwązany z tą
 aplikacją silnik JetEngine.
 
-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}
@@ -44,15 +45,13 @@ 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
@@ -68,6 +67,6 @@ fi
 
 %files
 %defattr(644,root,root,755)
-%doc %{_modname}-%{version}/CREDITS
-%config(noreplace) %verify(not md5 mtime size) %{php_sysconfdir}/conf.d/%{_modname}.ini
-%attr(755,root,root) %{php_extensiondir}/%{_modname}.so
+%doc CREDITS
+%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-mdbtools.git/commitdiff/882c2840ed8bf4901236e59514bc17fd17ab240b



More information about the pld-cvs-commit mailing list