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 # http://apache.webthing.com/database/apr_dbd_mysql.c, our is modified
24 Source1: apr_dbd_mysql.c
25 # Source1-md5: cf99813d81c128be5a8bb0b4726fef42
26 Patch0: %{name}-link.patch
27 Patch1: %{name}-mysql.patch
28 URL: http://apr.apache.org/
29 BuildRequires: apr-devel >= 1:1.1.0
30 BuildRequires: autoconf
31 BuildRequires: db-devel
32 BuildRequires: expat-devel
33 BuildRequires: gdbm-devel
34 BuildRequires: libtool
35 %{?with_mysql:BuildRequires: mysql-devel}
36 %{?with_ldap:BuildRequires: openldap-devel}
37 %{?with_pgsql:BuildRequires: postgresql-devel}
38 %{?with_sqlite:BuildRequires: sqlite-devel >= 2}
39 %{?with_sqlite3:BuildRequires: sqlite3-devel >= 3}
40 %{?with_mysql:BuildRequires: apr-devel >= 1:1.2.2-2.6}
41 Requires: apr >= 1:1.1.0
42 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
44 %define _includedir /usr/include/apr-util
47 A companion library to Apache Portable Runtime.
50 Biblioteka towarzysz±ca dla biblioteki Apache Portable Runtime
51 (przeno¶nej biblioteki uruchomieniowej).
54 Summary: Header files and development documentation for apr-util
55 Summary(pl): Pliki nag³ówkowe i dokumentacja programisty do apr-util
56 Group: Development/Libraries
57 Requires: %{name} = %{epoch}:%{version}-%{release}
58 Requires: apr-devel >= 1:1.1.0
62 %{?with_mysql:Requires: mysql-devel}
63 %{?with_ldap:Requires: openldap-devel}
64 %{?with_pgsql:Requires: postgresql-devel}
65 %{?with_sqlite:Requires: sqlite-devel >= 2}
66 %{?with_sqlite3:Requires: sqlite3-devel >= 3}
69 Header files and development documentation for apr-util.
71 %description devel -l pl
72 Pliki nag³ówkowe i dokumentacja programisty do apr-util.
75 Summary: Static apr-util library
76 Summary(pl): Statyczna biblioteka apr-util
77 Group: Development/Libraries
78 Requires: %{name}-devel = %{epoch}:%{version}-%{release}
81 Static apr-util library.
83 %description static -l pl
84 Statyczna biblioteka apr-util.
91 cp %{SOURCE1} dbd/apr_dbd_mysql.c
93 # not needed, gen-build.py is not packaged in apr-util
94 # (and it shouldn't apr-devel should have it -glen)
95 %{__perl} -pi -e 's/^(.*gen-build\.py)/#$1/' buildconf
100 --with-apr=%{_datadir}/apr
103 --with-apr=%{_bindir}/apr-1-config \
106 --with-ldap-include=%{_prefix}/include \
107 --with-ldap-lib=%{_libdir} \
109 --with-iconv=%{_prefix} \
110 %{?with_mysql:--with-mysql=%{_prefix}} \
111 %{!?with_pgsql:--without-pgsql} \
112 %{!?with_sqlite:--without-sqlite2} \
113 %{!?with_sqlite3:--without-sqlite3}
118 rm -rf $RPM_BUILD_ROOT
121 DESTDIR=$RPM_BUILD_ROOT
124 rm -rf $RPM_BUILD_ROOT
126 %post -p /sbin/ldconfig
127 %postun -p /sbin/ldconfig
130 %defattr(644,root,root,755)
132 %{?with_mysql:%doc INSTALL.MySQL}
133 %attr(755,root,root) %{_libdir}/lib*.so.*.*
136 %defattr(644,root,root,755)
137 %attr(755,root,root) %{_bindir}/*
138 %attr(755,root,root) %{_libdir}/lib*.so
140 %{_libdir}/aprutil.exp
142 %{_pkgconfigdir}/apr-util-1.pc
145 %defattr(644,root,root,755)