%define apuver 1 %define contentdir /var/www %define localstatedir /var Summary: Apache Portable Runtime Utility library Name: apr-util Version: 1.6.1 Release: 1 License: Apache Software License 2.0 Group: System Environment/Libraries URL: http://apr.apache.org/ Source0: https://dlcdn.apache.org/apr/apr-util-%{version}.tar.bz2 Source1: https://dlcdn.apache.org/apr/%{name}-%{version}.tar.bz2.asc Source2: https://dlcdn.apache.org/apr/%{name}-%{version}.tar.bz2.sha256 Patch0: apr-util-1.6.1-libiconv_hardcode.patch %define _libdir64 %{_prefix}/lib64 %define dotests 1 Requires: apr >= 1.5.2-1 Requires: expat >= 2.2.9 Requires: libgcc >= 8.3.0 Requires: libiconv >= 1.16 Requires: openldap >= 2.4.58 Requires: sqlite >= 3.32.3 Conflicts: httpd <= 2.4.38-1 %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: %{name} = %{version}-%{release} Requires: apr-devel >= 1.5.2 Conflicts: httpd-devel <= 2.4.38-1 %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 export PATH=/opt/freeware/bin:$PATH %setup -q %patch0 # Duplicate source for 32 & 64 bits rm -rf /tmp/%{name}-%{version}-32bit mkdir /tmp/%{name}-%{version}-32bit mv * /tmp/%{name}-%{version}-32bit mkdir 32bit mv /tmp/%{name}-%{version}-32bit/* 32bit rm -rf /tmp/%{name}-%{version}-32bit mkdir 64bit cp -rp 32bit/* 64bit/ %build export CC="/opt/freeware/bin/gcc" export LTFLAGS="--tag=CC --silent" export RM="/usr/bin/rm -f" export AR="/usr/bin/ar -X32_64" cd 64bit # first build the 64-bit version export OBJECT_MODE=64 export CFLAGS="-maix64 -fsigned-char -O2" export LDFLAGS="-L/opt/freeware/lib64 -L/opt/freeware/lib -Wl,-blibpath:/opt/freeware/lib64:/opt/freeware/lib:/usr/lib:/lib" export LIBTOOL="/opt/freeware/lib/apr-1/build/libtool" ./configure \ --prefix=%{_sysconfdir}/httpd \ --exec-prefix=%{_prefix} \ --bindir=%{_bindir} \ --sbindir=%{_sbindir} \ --mandir=%{_mandir} \ --libdir=%{_libdir64} \ --includedir=%{_includedir}/apr-1 \ --localstatedir=%{localstatedir} \ --datadir=%{contentdir} \ --with-apr=%{_bindir}/apr-1-config_64 \ --with-ldap=yes make %{?_smp_mflags} if [ "%{dotests}" == 1 ] then ( gmake -k check LDFLAGS="-L%{_builddir}/%{name}-%{version}/64bit/.libs $LDFLAGS" || true ) fi cd ../32bit # now build the 32-bit version export OBJECT_MODE=32 export CFLAGS="-maix32 -fsigned-char -D_LARGE_FILES -O2" export LDFLAGS="-L/opt/freeware/lib -Wl,-blibpath:/opt/freeware/lib:/usr/lib:/lib -Wl,-bmaxdata:0x80000000" ./configure \ --prefix=%{_sysconfdir}/httpd \ --exec-prefix=%{_prefix} \ --bindir=%{_bindir} \ --sbindir=%{_sbindir} \ --mandir=%{_mandir} \ --libdir=%{_libdir} \ --includedir=%{_includedir}/apr-1 \ --localstatedir=%{localstatedir} \ --datadir=%{contentdir} \ --with-apr=%{_bindir}/apr-1-config \ --with-ldap=yes gmake %{?_smp_mflags} if [ "%{dotests}" == 1 ] then ( gmake -k check LDFLAGS="-L%{_builddir}/%{name}-%{version}/32bit/.libs $LDFLAGS" || true ) fi %install [ "${RPM_BUILD_ROOT}" != "/" ] && rm -rf ${RPM_BUILD_ROOT} export PATH=/opt/freeware/bin:$PATH cd 64bit export OBJECT_MODE=64 make DESTDIR=${RPM_BUILD_ROOT} install ( cd ${RPM_BUILD_ROOT}%{_bindir} for f in * ; do mv -f ${f} ${f}_64 done ) cd ../32bit export OBJECT_MODE=32 make DESTDIR=${RPM_BUILD_ROOT} install %clean [ "${RPM_BUILD_ROOT}" != "/" ] && rm -rf ${RPM_BUILD_ROOT} %files %defattr(-,root,system,-) %doc 32bit/CHANGES 32bit/LICENSE 32bit/NOTICE %{_libdir}/*.so* %{_libdir64}/*.so* %dir %{_libdir}/%{name}-%{apuver} %dir %{_libdir64}/%{name}-%{apuver} %{_libdir}/%{name}-%{apuver}/*.so %{_libdir64}/%{name}-%{apuver}/*.so %files devel %defattr(-,root,system,-) %{_bindir}/* %{_includedir}/* %{_libdir}/aprutil.exp %{_libdir64}/aprutil.exp #%{_libdir}/*.a %{_libdir}/*.la #%{_libdir64}/*.a %{_libdir64}/*.la %{_libdir}/pkgconfig/*.pc %{_libdir64}/pkgconfig/*.pc %changelog * Thu Jan 20 2022 Reshma V Kumar - 1.6.1-1 - Update to 1.6.1 * Wed Oct 20 2021 Rishita Saha 1.5.4-2 - Removed dependency on cyrus-sasl * Mon Mar 04 2019 Reshma V Kumar 1.5.4-1 - Build for AIX toolbox * Thu Aug 10 2017 Tony Reix 1.5.2-2 - Remove -bmaxdata for 64bit - Add build.log file - Add tests - Move from xlc to gcc * Wed Jul 06 2016 Laurent GAY & Matthieu Sarter 1.5.2-1 - Update to version 1.5.2 - improved build environment to fix crashes * Tue Dec 09 2014 Gerard Visiedo 1.5.1-1 - Update to version 1.5.1 * Tue Jul 24 2012 Patricia Cugny 1.4.6-1 - Update to version 1.4.6 * Tue Mar 27 2012 Gerard Visiedo 1.3.9-3 - Add .pc file into apr-devel package * Thu Feb 17 2011 Gerard Visiedo 1.3.9-2 - Add patch for aix6.1 * Wed Jan 20 2010 Jean Noel Cordenner 1.3.9 - Update to version 1.3.9 * Fri Jul 31 2009 BULL 1.3.7 - Fisrt port for AIX