From 5d044333340b9486235b98cdebd4e721f6ce6dd1 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Adam=20Go=C5=82=C4=99biowski?= Date: Sun, 11 Jan 2009 14:33:12 +0000 Subject: [PATCH 1/1] - new Changed files: php-pecl-mdbtools-paths.patch -> 1.1 php-pecl-mdbtools.spec -> 1.1 --- php-pecl-mdbtools-paths.patch | 55 ++++++++++++++++++++++++++ php-pecl-mdbtools.spec | 73 +++++++++++++++++++++++++++++++++++ 2 files changed, 128 insertions(+) create mode 100644 php-pecl-mdbtools-paths.patch create mode 100644 php-pecl-mdbtools.spec diff --git a/php-pecl-mdbtools-paths.patch b/php-pecl-mdbtools-paths.patch new file mode 100644 index 0000000..4229e9d --- /dev/null +++ b/php-pecl-mdbtools-paths.patch @@ -0,0 +1,55 @@ +--- php-pecl-mdbtools-1.0.0/mdbtools-1.0.0/config.m4~ 2007-11-27 16:13:18.000000000 +0100 ++++ php-pecl-mdbtools-1.0.0/mdbtools-1.0.0/config.m4 2009-01-11 15:16:43.231780402 +0100 +@@ -26,24 +26,18 @@ + LDFLAGS="$CFLAGS $GLIB_LIBS" + + +- +- if test -r "$PHP_MDBTOOLS/include/mdbtools.h"; then +- PHP_MDBTOOLS_DIR="$PHP_MDBTOOLS" +- else +- AC_MSG_CHECKING(for mdbtools in default path) +- for i in /usr /usr/local; do +- if test -r "$i/include/mdbtools.h"; then +- PHP_MDBTOOLS_DIR=$i +- AC_MSG_RESULT(found in $i) +- break +- fi +- done +- if test "x" = "x$PHP_MDBTOOLS_DIR"; then +- AC_MSG_ERROR(not found) ++ AC_MSG_CHECKING(for mdbtools header files) ++ for dir in $PHP_MDBTOOLS /usr/include /usr/include/mdb /usr/local/include /usr/local/include/mdb; do ++ if test -r "$dir/mdbtools.h"; then ++ AC_MSG_RESULT(found in $dir) ++ PHP_MDBTOOLS_DIR=$dir + fi +- fi ++ done ++ if test "x" = "x$PHP_MDBTOOLS_DIR"; then ++ AC_MSG_ERROR(not found) ++ fi + +- PHP_ADD_INCLUDE($PHP_MDBTOOLS_DIR/include) ++ PHP_ADD_INCLUDE($PHP_MDBTOOLS_DIR) + + export OLD_CPPFLAGS="$CPPFLAGS" + export CPPFLAGS="$CPPFLAGS $INCLUDES -DHAVE_MDBTOOLS" +@@ -76,7 +76,7 @@ + PHP_NEW_EXTENSION(mdbtools, mdbtools.c , $ext_shared) + AC_MSG_CHECKING([whether mdb_open() takes one or two parameters]) + OLD_CFLAGS=$CFLAGS +- CFLAGS="$CFLAGS -I$PHP_MDBTOOLS_DIR/include" ++ CFLAGS="$CFLAGS -I$PHP_MDBTOOLS_DIR" + AC_TRY_COMPILE([#include ], [mdb_open("foo", MDB_NOFLAGS);], RESULT="two", RESULT="one") + if test "$RESULT" = "two" + then +@@ -87,7 +87,7 @@ + + AC_MSG_CHECKING([whether mdb_bind_column() takes three or four parameters]) + OLD_CFLAGS=$CFLAGS +- CFLAGS="$CFLAGS -I$PHP_MDBTOOLS_DIR/include" ++ CFLAGS="$CFLAGS -I$PHP_MDBTOOLS_DIR" + AC_TRY_COMPILE([#include ], [mdb_bind_column(NULL, 1, NULL, NULL);], RESULT="four", RESULT="three") + if test "$RESULT" = "four" + then diff --git a/php-pecl-mdbtools.spec b/php-pecl-mdbtools.spec new file mode 100644 index 0000000..645bdb3 --- /dev/null +++ b/php-pecl-mdbtools.spec @@ -0,0 +1,73 @@ +%define _modname mdbtools +%define _status stable +Summary: MDB data file access library +Summary(pl.UTF-8): biblioteka dostępu do plików MDB +Name: php-pecl-%{_modname} +Version: 1.0.0 +Release: 1 +License: LGPL +Group: Development/Languages/PHP +Source0: http://pecl.php.net/get/%{_modname}-%{version}.tgz +# Source0-md5: 758f844257c50dbd07c2b9a67a83954b +Patch0: %{name}-paths.patch +URL: http://pecl.php.net/package/mdbtools/ +BuildRequires: mdbtools-devel +BuildRequires: php-devel >= 3:5.0.0 +BuildRequires: rpmbuild(macros) >= 1.344 +%{?requires_php_extension} +Requires: php-common >= 4:5.0.4 +BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) + +%description +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}. + +%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}. + +%prep +%setup -q -c +%patch0 -p1 + +%build +cd %{_modname}-%{version} +phpize +%configure +%{__make} + +%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 +EOF + +%clean +rm -rf $RPM_BUILD_ROOT + +%post +%php_webserver_restart + +%postun +if [ "$1" = 0 ]; then + %php_webserver_restart +fi + +%files +%defattr(644,root,root,755) +%doc %{_modname}-%{version}/{CREDITS,EXPERIMENTAL} +%config(noreplace) %verify(not md5 mtime size) %{php_sysconfdir}/conf.d/%{_modname}.ini +%attr(755,root,root) %{php_extensiondir}/%{_modname}.so -- 2.44.0