2 # - play with DSO dbd's
3 # - licensing issues with mysql. can we (PLD Linux) package it inside
4 # apr-util? see INSTALL.MySQL for more details
7 %bcond_without ldap # without LDAP support
8 %bcond_with mysql # with MySQL support
9 %bcond_without pgsql # without PostgreSQL support
10 %bcond_with sqlite # with SQLite 2.x support
11 %bcond_without sqlite3 # without SQLite3 support
13 Summary: A companion library to Apache Portable Runtime
14 Summary(pl): Biblioteka towarzysz±ca Apache Portable Runtime
21 Source0: http://www.apache.org/dist/apr/%{name}-%{version}.tar.bz2
22 # Source0-md5: 694228b227e30cb9da3823514516e91c
23 Source1: http://apache.webthing.com/database/apr_dbd_mysql.c
24 # Source1-md5: 59d26a91cb7f1492fea9ab3e6cd054fc
25 Patch0: %{name}-link.patch
26 Patch1: %{name}-mysql.patch
27 URL: http://apr.apache.org/
28 BuildRequires: apr-devel >= 1:1.1.0
29 BuildRequires: autoconf
30 BuildRequires: db-devel
31 BuildRequires: expat-devel
32 BuildRequires: gdbm-devel
33 BuildRequires: libtool
34 %{?with_mysql:BuildRequires: mysql-devel}
35 %{?with_ldap:BuildRequires: openldap-devel}
36 %{?with_pgsql:BuildRequires: postgresql-devel}
37 %{?with_sqlite:BuildRequires: sqlite-devel >= 2}
38 %{?with_sqlite3:BuildRequires: sqlite3-devel >= 3}
39 %{?with_mysql:BuildRequires: apr-devel >= 1:1.2.2-2.6}
40 Requires: apr >= 1:1.1.0
41 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
43 %define _includedir /usr/include/apr-util
46 A companion library to Apache Portable Runtime.
49 Biblioteka towarzysz±ca dla biblioteki Apache Portable Runtime
50 (przeno¶nej biblioteki uruchomieniowej).
53 Summary: Header files and development documentation for apr-util
54 Summary(pl): Pliki nag³ówkowe i dokumentacja programisty do apr-util
55 Group: Development/Libraries
56 Requires: %{name} = %{epoch}:%{version}-%{release}
57 Requires: apr-devel >= 1:1.1.0
61 %{?with_mysql:Requires: mysql-devel}
62 %{?with_ldap:Requires: openldap-devel}
63 %{?with_pgsql:Requires: postgresql-devel}
64 %{?with_sqlite:Requires: sqlite-devel >= 2}
65 %{?with_sqlite3:Requires: sqlite3-devel >= 3}
68 Header files and development documentation for apr-util.
70 %description devel -l pl
71 Pliki nag³ówkowe i dokumentacja programisty do apr-util.
74 Summary: Static apr-util library
75 Summary(pl): Statyczna biblioteka apr-util
76 Group: Development/Libraries
77 Requires: %{name}-devel = %{epoch}:%{version}-%{release}
80 Static apr-util library.
82 %description static -l pl
83 Statyczna biblioteka apr-util.
90 cp %{SOURCE1} dbd/apr_dbd_mysql.c
92 # not needed, gen-build.py is not packaged in apr-util
93 # (and it shouldn't apr-devel should have it -glen)
94 %{__perl} -pi -e 's/^(.*gen-build\.py)/#$1/' buildconf
99 --with-apr=%{_datadir}/apr
102 --with-apr=%{_bindir}/apr-1-config \
105 --with-ldap-include=%{_prefix}/include \
106 --with-ldap-lib=%{_libdir} \
108 --with-iconv=%{_prefix} \
109 %{?with_mysql:--with-mysql=%{_prefix}} \
110 %{!?with_pgsql:--without-pgsql} \
111 %{!?with_sqlite:--without-sqlite2} \
112 %{!?with_sqlite3:--without-sqlite3}
117 rm -rf $RPM_BUILD_ROOT
120 DESTDIR=$RPM_BUILD_ROOT
123 rm -rf $RPM_BUILD_ROOT
125 %post -p /sbin/ldconfig
126 %postun -p /sbin/ldconfig
129 %defattr(644,root,root,755)
131 %{?with_mysql:%doc INSTALL.MySQL}
132 %attr(755,root,root) %{_libdir}/lib*.so.*.*
135 %defattr(644,root,root,755)
136 %attr(755,root,root) %{_bindir}/*
137 %attr(755,root,root) %{_libdir}/lib*.so
139 %{_libdir}/aprutil.exp
141 %{_pkgconfigdir}/apr-util-1.pc
144 %defattr(644,root,root,755)