%define aprver 0 %define real_name apr Summary: Apache Portable Runtime library Name: apr0 Version: 0.9.19 Release: 1 License: Apache Software License Group: System Environment/Libraries URL: http://apr.apache.org/ Source0: http://www.apache.org/dist/apr/%{real_name}-%{version}.tar.bz2 Source1: http://www.apache.org/dist/apr/%{real_name}-%{version}.tar.bz2.asc Source2: http://www.apache.org/dist/apr/%{real_name}-%{version}.tar.bz2.md5 Source3: %{real_name}.h BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-buildroot %define _libdir64 %{_prefix}/lib64 %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. The library is available as 32-bit and 64-bit. %package devel Group: Development/Libraries Summary: APR library development kit Requires: %{name} = %{version}-%{release} %description 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. If you are compiling a 32-bit program, no special compiler options are needed. If you are compiling a 64-bit program, you have to compile and link your application with "cc -q64" or "gcc -maix64". %prep %setup -q -n %{real_name}-%{version} 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" ./configure \ --prefix=%{_prefix} \ --libdir=%{_libdir64} \ --enable-static --enable-shared \ --with-installbuilddir=%{_libdir64}/%{real_name}-%{aprver}/build make %{?_smp_mflags} cd .. # now build the 32-bit version export CC="cc" ./configure \ --prefix=%{_prefix} \ --enable-static --enable-shared \ --with-installbuilddir=%{_libdir}/%{real_name}-%{aprver}/build make %{?_smp_mflags} %install [ "${RPM_BUILD_ROOT}" != "/" ] && rm -rf ${RPM_BUILD_ROOT} cd 64bit make DESTDIR=${RPM_BUILD_ROOT} install mv ${RPM_BUILD_ROOT}%{_includedir}/%{real_name}-%{aprver}/%{real_name}.h ${RPM_BUILD_ROOT}%{_includedir}/%{real_name}-%{aprver}/%{real_name}-ppc64.h cd .. make DESTDIR=${RPM_BUILD_ROOT} install mv ${RPM_BUILD_ROOT}%{_includedir}/%{real_name}-%{aprver}/%{real_name}.h ${RPM_BUILD_ROOT}%{_includedir}/%{real_name}-%{aprver}/%{real_name}-ppc32.h cp %{SOURCE3} ${RPM_BUILD_ROOT}%{_includedir}/%{real_name}-%{aprver}/%{real_name}.h ( 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,-) %doc docs/APRDesign.html docs/canonical_filenames.html %doc docs/incomplete_types docs/non_apr_programs %{_bindir}/* %{_includedir}/* %{_libdir}/*.a %{_libdir64}/*.a %{_libdir}/%{real_name}.exp %{_libdir64}/%{real_name}.exp %{_libdir}/%{real_name}-%{aprver} %{_libdir64}/%{real_name}-%{aprver} /usr/bin/* /usr/include/* /usr/lib/*.a /usr/lib64/*.a %changelog * Fri Jan 14 2011 Michael Perzl - 0.9.19-1 - updated to version 0.9.19 * Tue Apr 21 2009 Michael Perzl - 0.9.17-1 - first version for AIX V5.1 and higher