]> git.pld-linux.org Git - packages/apr-util.git/blobdiff - apr-util.spec
- release 2
[packages/apr-util.git] / apr-util.spec
index eb34547346af243c6ce8cb46618dfa1aaa35960e..078d6a1ed61f0af413045f0cee0e2ee674f5b17d 100644 (file)
@@ -8,42 +8,59 @@
 %bcond_with    sqlite2 # with SQLite 2.x DBD module
 %bcond_without sqlite3 # without SQLite3 DBD module
 %bcond_without ldap    # without LDAP module
-#
+%bcond_without tests
+
+# define       dbver   db50
+%if 0%{!?dbver:1}
+       %if "%{pld_release}" == "th"
+               %define dbver   db47
+       %endif
+       %if "%{pld_release}" == "ti"
+               %define dbver   db45
+       %endif
+       %if "%{pld_release}" == "ac"
+               %define dbver   db42
+       %endif
+%endif
+
 Summary:       A companion library to Apache Portable Runtime
 Summary(pl.UTF-8):     Biblioteka towarzysząca Apache Portable Runtime
 Name:          apr-util
-Version:       1.3.4
-Release:       3
+Version:       1.3.12
+Release:       2
 Epoch:         1
 License:       Apache v2.0
 Group:         Libraries
 Source0:       http://www.apache.org/dist/apr/%{name}-%{version}.tar.bz2
-# Source0-md5: adfbe525cf3914cf769340e8f6a6d14b
+# Source0-md5: 0f671b037ca62751a8a7005578085560
 Patch0:                %{name}-link.patch
 Patch1:                %{name}-config-noldap.patch
 Patch2:                %{name}-libtool.patch
+Patch3:                %{name}-flags.patch
 URL:           http://apr.apache.org/
 BuildRequires: apr-devel >= 1:1.3.0
-BuildRequires: autoconf
-%if "%{pld_release}" == "ti"
-BuildRequires: db-devel >= 4.5
-%else
+BuildRequires: autoconf >= 2.59
 %if "%{pld_release}" == "th"
 BuildRequires: db-devel >= 4.7
-%else
-BuildRequires: db-devel
 %endif
+%if "%{pld_release}" == "ti"
+BuildRequires: db-devel >= 4.5
+%endif
+%if "%{pld_release}" == "ac"
+BuildRequires: db-devel >= 4.2
+BuildConflicts:        db4.5-devel
 %endif
 BuildRequires: expat-devel
 %{?with_freetds:BuildRequires: freetds-devel}
 BuildRequires: libtool
 %{?with_mysql:BuildRequires:   mysql-devel}
 %{?with_ldap:BuildRequires:    openldap-devel >= 2.3.0}
-%{?with_odbc:BuildRequires:    unixODBC-devel}
 %{?with_pgsql:BuildRequires:   postgresql-devel}
 BuildRequires: rpm >= 4.4.9-56
 %{?with_sqlite2:BuildRequires: sqlite-devel >= 2}
 %{?with_sqlite3:BuildRequires: sqlite3-devel >= 3}
+%{?with_odbc:BuildRequires:    unixODBC-devel}
+BuildRequires: which
 Requires:      apr >= 1:1.3.0
 BuildRoot:     %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
 
@@ -56,6 +73,18 @@ A companion library to Apache Portable Runtime.
 Biblioteka towarzysząca dla biblioteki Apache Portable Runtime
 (przenośnej biblioteki uruchomieniowej).
 
+%package dbm-db
+Summary:       DBM driver for DB
+Summary(pl.UTF-8):     Sterownik DBM dla DB
+Group:         Libraries
+Requires:      %{name} = %{epoch}:%{version}-%{release}
+
+%description dbm-db
+DBM driver for DB.
+
+%description dbm-db -l pl.UTF-8
+Sterownik DBM dla DB.
+
 %package dbd-freetds
 Summary:       DBD driver for FreeTDS (Sybase/MS SQL)
 Summary(pl.UTF-8):     Sterownik DBD dla FreeTDS (Sybase/MS SQL)
@@ -160,7 +189,6 @@ Summary(pl.UTF-8):  Pliki nagłówkowe i dokumentacja programisty do apr-util
 Group:         Development/Libraries
 Requires:      %{name} = %{epoch}:%{version}-%{release}
 Requires:      apr-devel >= 1:1.3.0
-Requires:      db-devel
 Requires:      expat-devel
 
 %description devel
@@ -186,8 +214,12 @@ Statyczna biblioteka apr-util.
 %patch0 -p1
 %patch1 -p1
 %patch2 -p1
+%patch3 -p1
 
-rm -rf xml/expat
+# be sure to link with db version requested
+%{__sed} -i -e 's/db4 db\|db5 db//' build/dbm.m4
+
+%{__rm} -r xml/expat
 
 echo '
 <Layout PLD>
@@ -216,15 +248,7 @@ echo '
        --enable-layout=PLD \
        --with-apr=%{_bindir}/apr-1-config \
        --with-berkeley-db=%{_prefix} \
-%if "%{pld_release}" == "ti"
-       --with-dbm=db45 \
-%else
-%if "%{pld_release}" == "th"
-       --with-dbm=db47 \
-%else
-       --with-dbm=db4 \
-%endif
-%endif
+       --with-dbm=%{dbver} \
        --with-iconv=%{_prefix} \
 %if %{with ldap}
        --with-ldap \
@@ -242,13 +266,15 @@ echo '
 %{__make} \
        CC="%{__cc}"
 
+%{?with_tests:%{__make} -j1 check}
+
 %install
 rm -rf $RPM_BUILD_ROOT
 
 %{__make} install \
        DESTDIR=$RPM_BUILD_ROOT
 
-rm $RPM_BUILD_ROOT%{_libdir}/apr-util-1/*.{la,a}
+%{__rm} $RPM_BUILD_ROOT%{_libdir}/apr-util-1/*.{la,a}
 
 %clean
 rm -rf $RPM_BUILD_ROOT
@@ -263,6 +289,11 @@ rm -rf $RPM_BUILD_ROOT
 %attr(755,root,root) %ghost %{_libdir}/libaprutil-1.so.0
 %dir %{_libdir}/apr-util-1
 
+%files dbm-db
+%defattr(644,root,root,755)
+%attr(755,root,root) %{_libdir}/apr-util-1/apr_dbm_db-1.so
+%attr(755,root,root) %{_libdir}/apr-util-1/apr_dbm_db.so
+
 %if %{with freetds}
 %files dbd-freetds
 %defattr(644,root,root,755)
@@ -273,7 +304,6 @@ rm -rf $RPM_BUILD_ROOT
 %if %{with mysql}
 %files dbd-mysql
 %defattr(644,root,root,755)
-%doc README.MySQL
 %attr(755,root,root) %{_libdir}/apr-util-1/apr_dbd_mysql-1.so
 %attr(755,root,root) %{_libdir}/apr-util-1/apr_dbd_mysql.so
 %endif
This page took 0.208654 seconds and 4 git commands to generate.