]> git.pld-linux.org Git - packages/php-pecl-mdbtools.git/commitdiff
support building for multiple php versions
authorElan Ruusamäe <glen@delfi.ee>
Fri, 21 Jun 2013 17:18:39 +0000 (20:18 +0300)
committerElan Ruusamäe <glen@delfi.ee>
Fri, 21 Jun 2013 17:18:39 +0000 (20:18 +0300)
php-pecl-mdbtools.spec

index 7355a69323a5f46fce63b315f5bea081e2d4993e..be2982db89ac725b74e75128eb21b3caabe11de7 100644 (file)
@@ -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
This page took 0.101119 seconds and 4 git commands to generate.