#(ie. use with rpm --rebuild): # # --with debug Compile with debugging code # # enable build with debugging code: will _not_ strip away any debugging code, # will _add_ -g3 to CFLAGS, will _add_ --enable-maintainer-mode to # configure. %define build_debug 0 # commandline overrides: # rpm -ba|--rebuild --with 'xxx' %{?_with_debug: %{expand: %%define build_debug 1}} %if %{build_debug} # disable build root strip policy %define __spec_install_post %{_libdir}/rpm/brp-compress || : # This gives extra debuggin and huge binaries %{expand:%%define optflags %{optflags} %([ ! $DEBUG ] && echo '-g3')} %endif %if %{build_debug} %define build_debug 1 %endif %define name apr %define aprver 0 %define version 0.9.6 %define libname %mklibname %{name} %{aprver} %define epoch 1 Summary: Apache Portable Runtime library Name: %{name} Version: %{version} Release: %mkrel 5 License: Apache License Group: System/Libraries URL: http://apr.apache.org/ Source0: apr-%{version}.tar.gz Source1: apr-%{version}.tar.gz.asc # OE: these are from fedora Patch0: apr-0.9.3-deplibs.patch.bz2 Patch1: apr-0.9.5-config.diff.bz2 Patch2: apr-0.9.3-noipv6.patch.bz2 Patch3: apr-0.9.4-trimlibs.patch.bz2 Patch4: apr-0.9.4-tests.patch.bz2 Patch5: apr-0.9.5-mutextype_reorder.diff.bz2 Patch6: apr-0.9.6-guardsize.diff.bz2 Patch7: apr-0.9.4-cleanups.patch.bz2 Patch8: apr-0.9.4-cflags.patch.bz2 Patch9: apr-0.9.4-lp64psem.patch.bz2 Patch10: apr-0.9.4-attrerror.patch.bz2 Patch11: apr-0.9.6-readdir64.patch.bz2 Patch12: apr-0.9.6-uidgid.patch.bz2 Patch13: apr-0.9.6-flushbufs.patch.bz2 BuildPrereq: autoconf2.5 BuildPrereq: automake1.7 BuildPrereq: libtool BuildPrereq: doxygen BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-buildroot %description The mission of the Apache Portable Runtime (APR) is to provide a free library of C data structures and routines, forming a system portability layer to as many operating systems as possible, including Unices, MS Win32, BeOS and OS/2. You can build %{name} with some conditional build swithes; (ie. use with rpm --rebuild): --with debug Compile with debugging code (disabled) %package -n %{libname} Summary: Apache Portable Runtime library Group: System/Libraries Provides: lib%{name} Obsoletes: lib%{name} Epoch: %{epoch} %description -n %{libname} The mission of the Apache Portable Runtime (APR) is to provide a free library of C data structures and routines, forming a system portability layer to as many operating systems as possible, including Unices, MS Win32, BeOS and OS/2. %package -n %{libname}-devel Summary: APR library development kit Group: Development/C Requires: %{libname} = %{epoch}:%{version} Provides: lib%{name}-devel %{name}-devel Obsoletes: lib%{name}-devel %{name}-devel Epoch: %{epoch} %description -n %{libname}-devel This package provides the support files which can be used to build applications using the APR library. The mission of the Apache Portable Runtime (APR) is to provide a free library of C data structures and routines. %prep %setup -q -n %{name}-%{version} %patch0 -p1 -b .deplibs %patch1 -p0 -b .config %patch2 -p1 -b .noipv6 %patch3 -p1 -b .trimlibs %patch4 -p1 -b .tests %patch5 -p0 -b .mutextype_reorder %patch6 -p1 -b .guardsize %patch7 -p1 -b .cleanups %patch8 -p1 -b .cflags %patch9 -p1 -b .lp64psem %patch10 -p1 -b .attrerror %patch11 -p1 -b .readdir64 %patch12 -p1 -b .uidgid %patch13 -p1 -b .flushbufs %build %{__cat} >> config.layout << EOF <Layout NUX> prefix: %{_prefix} exec_prefix: %{_prefix} bindir: %{_bindir} sbindir: %{_sbindir} libdir: %{_libdir} libexecdir: %{_libexecdir} mandir: %{_mandir} infodir: %{_infodir} includedir: %{_includedir}/apr-%{aprver} sysconfdir: %{_sysconfdir} datadir: %{_datadir} installbuilddir: %{_libdir}/apr/build localstatedir: %{_var} runtimedir: %{_var}/run libsuffix: -\${APR_MAJOR_VERSION} </Layout> EOF # We need to re-run ./buildconf because of any applied patch(es) ./buildconf %configure2_5x \ --cache-file=config.cache \ --includedir=%{_includedir}/apr-%{aprver} \ --with-installbuilddir=%{_libdir}/apr/build \ %if %{build_debug} --enable-debug \ --enable-maintainer-mode \ %endif --enable-layout=NUX \ %ifarch %ix86 %ifnarch i386 i486 --enable-nonportable-atomics=yes \ %endif %endif --with-devrandom=/dev/urandom %make make dox %install [ -n "%{buildroot}" -a "%{buildroot}" != / ] && rm -rf %{buildroot} # Run non-interactive tests %ifarch x86_64 # https://bugzilla.redhat.com/bugzilla/show_bug.cgi?id=97611 excludes=testlock %endif pushd test %make testall CFLAGS="-fno-strict-aliasing" TZ=PST8PDT ./testall -v ${excludes+-x $excludes} || exit 1 popd %if %{build_debug} export DONT_STRIP=1 %endif %makeinstall_std # These are referenced by apr_rules.mk for f in make_exports.awk make_var_export.awk; do install -m0644 build/${f} %{buildroot}%{_libdir}/apr/build/${f} done install -m0755 build/mkdir.sh %{buildroot}%{_libdir}/apr/build/mkdir.sh # Sanitize apr_rules.mk sed -e "/^apr_build/d" \ -e 's|$(apr_builders)|%{_libdir}/apr/build|g' \ -e 's|$(apr_builddir)|%{_libdir}/apr/build|g' \ < build/apr_rules.mk > %{buildroot}%{_libdir}/apr/build/apr_rules.mk # Move docs to more convenient location rm -rf html; mv docs/dox/html html # Unpackaged files: rm -f %{buildroot}%{_libdir}/apr.exp %post -n %{libname} -p /sbin/ldconfig %postun -n %{libname} -p /sbin/ldconfig %clean [ -n "%{buildroot}" -a "%{buildroot}" != / ] && rm -rf %{buildroot} %files -n %{libname} %defattr(-,root,root,-) %doc CHANGES README* %{_libdir}/libapr-%{aprver}.so.* %files -n %{libname}-devel %defattr(-,root,root,-) %doc docs/APRDesign.html docs/canonical_filenames.html %doc docs/incomplete_types docs/non_apr_programs %doc --parents html %{_bindir}/apr-config %{_libdir}/libapr-%{aprver}.*a %{_libdir}/libapr-%{aprver}.so %dir %{_libdir}/apr %dir %{_libdir}/apr/build %{_libdir}/apr/build/* %dir %{_includedir}/apr-%{aprver} %{_includedir}/apr-%{aprver}/*.h %changelog * Sun May 22 2005 Oden Eriksson <oeriksson@mandriva.com> 1:0.9.6-5mdk - sync with fedora (0.9.6-5) * Sun May 22 2005 Oden Eriksson <oeriksson@mandriva.com> 1:0.9.6-4mdk - sync with fedora - fix requires-on-release * Fri Mar 18 2005 Oden Eriksson <oeriksson@mandrakesoft.com> 0.9.6-3mdk - use the %%mkrel macro - drop the metux patch (P30) * Mon Feb 07 2005 Oden Eriksson <oeriksson@mandrakesoft.com> 0.9.6-2mdk - oops, only half of the P19 patch was implemented * Mon Feb 07 2005 Oden Eriksson <oeriksson@mandrakesoft.com> 0.9.6-1mdk - 0.9.6 - drop P3 and P19, these are implemented upstream * Thu Jan 20 2005 Oden Eriksson <oeriksson@mandrakesoft.com> 0.9.5-17mdk - run the tests in %%install * Tue Jan 11 2005 Oden Eriksson <oeriksson@mandrakesoft.com> 0.9.5-16mdk - make --with debug work * Wed Dec 29 2004 Oden Eriksson <oeriksson@mandrakesoft.com> 0.9.5-15mdk - revert latest "lib64 fixes" * Wed Dec 29 2004 Oden Eriksson <oeriksson@mandrakesoft.com> 0.9.5-14mdk - lib64 fixes * Thu Nov 25 2004 Oden Eriksson <oeriksson@mandrakesoft.com> 0.9.5-13mdk - 0.9.5 * Wed Sep 15 2004 Oden Eriksson <oeriksson@mandrakesoft.com> 0.9.5-12mdk - new P0 - rediffed P2 - new P17, another approach * Tue Aug 10 2004 Oden Eriksson <oeriksson@mandrakesoft.com> 0.9.5-11mdk - rebuilt * Tue Aug 03 2004 Oden Eriksson <oeriksson@mandrakesoft.com> 0.9.5-10mdk - sync with fedora (0.9.4-17) * Wed Jun 30 2004 Oden Eriksson <oeriksson@mandrakesoft.com> 0.9.5-9mdk - new P0 - remove one hunk from P1, partially implemented upstream - drop P6,P9,P10,P11,P12,P13,P14,P15,P16 and P18, the fix is implemented upstream - drop P8, similar fix is implemented upstream * Fri Jun 18 2004 Jean-Michel Dault <jmdault@mandrakesoft.com> 0.9.5-8mdk - rebuild with new openssl * Thu Jun 17 2004 Jean-Michel Dault <jmdault@mandrakesoft.com> 0.9.5-7mdk - use fcntl for mutexes instead of posix mutexes (which won't work on non-NPTL kernels and some older processors), or sysvsem which are not resistand under high load. * Wed Jun 16 2004 Oden Eriksson <oeriksson@mandrakesoft.com> 0.9.5-6mdk - sync with fedora * Thu Jun 10 2004 Oden Eriksson <oeriksson@mandrakesoft.com> 0.9.5-5mdk - sync with fedora * Tue May 18 2004 Oden Eriksson <oeriksson@mandrakesoft.com> 0.9.5-4mdk - sync with fedora * Tue May 18 2004 Oden Eriksson <oeriksson@mandrakesoft.com> 0.9.5-3mdk - add the metux mpm hooks (P30) * Sun May 09 2004 Oden Eriksson <oeriksson@mandrakesoft.com> 0.9.5-2mdk - oops!, forgot to pass "--cache-file=config.cache" to configure * Fri May 07 2004 Oden Eriksson <oeriksson@mandrakesoft.com> 0.9.5-1mdk - initial fedora import and mandrake adaptions * Wed Mar 24 2004 Joe Orton <jorton@redhat.com> 0.9.4-11 - add APR_LARGEFILE flag * Mon Mar 15 2004 Joe Orton <jorton@redhat.com> 0.9.4-10 - fix configure check for mmap of /dev/zero - just put -D_GNU_SOURCE in CPPFLAGS not _{BSD,SVID,XOPEN}_SOURCE * Tue Mar 02 2004 Elliot Lee <sopwith@redhat.com> 0.9.4-9.1 - rebuilt * Thu Feb 19 2004 Joe Orton <jorton@redhat.com> 0.9.4-9 - undocument apr_dir_read() ordering constraint and fix tests * Sun Feb 15 2004 Joe Orton <jorton@redhat.com> 0.9.4-8 - rebuilt without -Wall -Werror * Fri Feb 13 2004 Elliot Lee <sopwith@redhat.com> 0.9.4-7 - rebuilt * Tue Feb 3 2004 Joe Orton <jorton@redhat.com> 0.9.4-6 - define apr_off_t as int/long/... to prevent it changing with _FILE_OFFSET_BITS on 32-bit platforms * Mon Jan 12 2004 Joe Orton <jorton@redhat.com> 0.9.4-5 - add apr_temp_dir_get fixes from HEAD * Thu Jan 8 2004 Joe Orton <jorton@redhat.com> 0.9.4-4 - ensure that libapr is linked against libpthread - don't link libapr against -lnsl * Thu Nov 13 2003 Joe Orton <jorton@redhat.com> 0.9.4-3 - -devel package no longer requires libtool * Fri Oct 3 2003 Joe Orton <jorton@redhat.com> 0.9.4-2 - disable tests on x86_64 (#97611) * Fri Oct 3 2003 Joe Orton <jorton@redhat.com> 0.9.4-1 - update to 0.9.4, enable tests - ensure that libresolv is not used * Sun Sep 7 2003 Joe Orton <jorton@redhat.com> 0.9.3-14 - use /dev/urandom (#103049) * Thu Jul 24 2003 Joe Orton <jorton@redhat.com> 0.9.3-13 - add back CC=gcc, CXX=g++ * Tue Jul 22 2003 Nalin Dahyabhai <nalin@redhat.com> 0.9.3-12 - rebuild * Mon Jul 14 2003 Joe Orton <jorton@redhat.com> 0.9.3-11 - work round useless autoconf 2.57 AC_DECL_SYS_SIGLIST * Thu Jul 10 2003 Joe Orton <jorton@redhat.com> 0.9.3-10 - support --cc and --cpp arguments in apr-config * Thu Jul 3 2003 Joe Orton <jorton@redhat.com> 0.9.3-9 - force libtool to use CC=gcc, CXX=g++ * Thu Jul 3 2003 Joe Orton <jorton@redhat.com> 0.9.3-8 - fix libtool location in apr_rules.mk * Mon Jun 30 2003 Joe Orton <jorton@redhat.com> 0.9.3-7 - use AI_ADDRCONFIG in getaddrinfo() support (#73350) - include a working libtool script rather than relying on /usr/bin/libtool (#97695) * Wed Jun 18 2003 Joe Orton <jorton@redhat.com> 0.9.3-6 - don't use /usr/bin/libtool * Wed Jun 04 2003 Elliot Lee <sopwith@redhat.com> - rebuilt * Tue May 20 2003 Joe Orton <jorton@redhat.com> 0.9.3-5 - add fix for psprintf memory corruption (CAN-2003-0245) - remove executable bit from apr_poll.h * Thu May 1 2003 Joe Orton <jorton@redhat.com> 0.9.3-4 - link libapr against libpthread - make apr-devel conflict with old subversion-devel - fix License * Tue Apr 29 2003 Joe Orton <jorton@redhat.com> 0.9.3-3 - run ldconfig in post/postun * Tue Apr 29 2003 Joe Orton <jorton@redhat.com> 0.9.3-2 - patch test suite to not care if IPv6 is disabled * Mon Apr 28 2003 Joe Orton <jorton@redhat.com> 0.9.3-1 - initial build