%define apuver 1 Summary: Apache Portable Runtime Utility library Name: apr-util Version: 1.3.4 Release: 1 License: Apache Software License 2.0 Group: System Environment/Libraries URL: http://apr.apache.org/ Source: %{name}-%{version}.tar.bz2 BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-buildroot %define _libdir64 %{_prefix}/lib64 BuildRequires: apr-devel >= 1.2.0 BuildRequires: pkg-config, sqlite-devel BuildRequires: expat-devel >= 2.0.0 Requires: apr >= 1.2.0 Requires: sqlite Requires: expat >= 2.0.0 %description The mission of the Apache Portable Runtime (APR) is to provide a free library of C data structures and routines. This library contains additional utility interfaces for APR; including support for XML, LDAP, database interfaces, URI parsing and more. %package devel Group: Development/Libraries Summary: APR utility library development kit Requires: apr-util = %{version}-%{release} Requires: apr-devel, pkg-config, sqlite-devel Requires: expat-devel >= 2.0.0 %description devel This package provides the support files which can be used to build applications using the APR utility library. The mission of the Apache Portable Runtime (APR) is to provide a free library of C data structures and routines. %prep %setup -q mkdir -p ../64bit cp -r * ../64bit/ mv ../64bit . %build # setup environment for 32-bit and 64-bit builds export AR="ar -X32_64" export NM="nm -X32_64" cd 64bit # first build the 64-bit version export CC="cc -q64" autoheader && autoconf ./configure \ --prefix=%{_prefix} \ --libdir=%{_libdir64} \ --enable-static --enable-shared \ --with-apr=%{_prefix} \ --includedir=%{_includedir}/apr-%{apuver} make %{?_smp_mflags} cd .. # now build he 32-bit version autoheader && autoconf export CC="cc" ./configure \ --prefix=%{_prefix} \ --enable-static --enable-shared \ --with-apr=%{_prefix} \ --includedir=%{_includedir}/apr-%{apuver} make %{?_smp_mflags} %install [ "${RPM_BUILD_ROOT}" != "/" ] && rm -rf ${RPM_BUILD_ROOT} cd 64bit make DESTDIR=${RPM_BUILD_ROOT} install cd .. make DESTDIR=${RPM_BUILD_ROOT} install ( cd ${RPM_BUILD_ROOT} for dir in bin include lib lib64 do mkdir -p usr/${dir} cd usr/${dir} ln -sf ../..%{_prefix}/${dir}/* . cd - done ) %clean [ "${RPM_BUILD_ROOT}" != "/" ] && rm -rf ${RPM_BUILD_ROOT} %files %defattr(-,root,system,-) %doc CHANGES LICENSE NOTICE %{_libdir}/*.so* %{_libdir64}/*.so* /usr/lib/*.so* /usr/lib64/*.so* %files devel %defattr(-,root,system,-) %{_bindir}/* %{_includedir}/* %{_libdir}/apr-util-%{apuver} %{_libdir64}/apr-util-%{apuver} %{_libdir}/aprutil.exp %{_libdir64}/aprutil.exp %{_libdir}/*.a %{_libdir64}/*.a %{_libdir}/*.la %{_libdir64}/*.la %{_libdir}/pkgconfig/*.pc %{_libdir64}/pkgconfig/*.pc /usr/bin/* /usr/include/* /usr/lib/*.a /usr/lib64/*.a /usr/lib/*.la /usr/lib64/*.la /usr/lib/apr-util-%{apuver} /usr/lib64/apr-util-%{apuver} %changelog * Tue Aug 19 2008 Michael Perzl - 1.3.4-1 - updated to version 1.3.4 * Sat Aug 16 2008 Michael Perzl - 1.3.2-1 - updated to version 1.3.2 and included both 32-bit and 64-bit shared objects * Mon Mar 31 2008 Michael Perzl - 1.2.12-2 - rebuilt against new version of expat * Tue Nov 27 2007 Michael Perzl - 1.2.12-1 - updated to v1.2.12 * Wed Sep 12 2007 Michael Perzl - 1.2.10-1 - first version for AIX V5.1 and higher