]> git.pld-linux.org Git - packages/apr-compat.git/blobdiff - apr-compat.spec
- up to 1.2.11
[packages/apr-compat.git] / apr-compat.spec
index 28cbef4e9e3a82cc43d4243b71b56410fa6d5a43..9bda213ab88d4284bb9dd3183661b4a8f158e31a 100644 (file)
@@ -1,20 +1,34 @@
-%define        snap    20030913101709
+#
+# Conditional build (Linux 2.4 compat, switch after Ac):
+%bcond_with    epoll           # use epoll() syscall (requires Linux 2.6)
+%bcond_with    sendfile64      # use sendfile64 on even if it requires Linux 2.6
+%bcond_with    tcpnodelaycork  # use TCP_NODELAY|TCP_CORK flags (requires Linux 2.6)
+#
+# Linux 2.4.32 supports sendfile64 only on i386 and mips (only 32-bit archs matter)
+%ifnarch ppc sparc sparc64
+%define                with_sendfile64         1
+%endif
 Summary:       Apache Portable Runtime
 Summary(pl):   Apache Portable Runtime - przeno¶na biblioteka uruchomieniowa
 Name:          apr
-Version:       0.9.4
-Release:       0.%{snap}.2
+Version:       1.2.11
+Release:       1
 Epoch:         1
-License:       GPL
+License:       Apache v2.0
 Group:         Libraries
-# http://www.apache.org/dist/apr/%{name}-%{version}.tar.gz
-Source0:       http://cvs.apache.org/snapshots/apr/%{name}_%{snap}.tar.gz
-# Source0-md5: d14874964cd7f686594534d9e949eaee
+Source0:       http://www.apache.org/dist/apr/%{name}-%{version}.tar.bz2
+# Source0-md5: 22ede19520beb37dc17e62592b06a59c
 Patch0:                %{name}-link.patch
+Patch1:                %{name}-metuxmpm.patch
+Patch2:                %{name}-libtool.patch
+Patch3:                %{name}-no-epoll.patch
 URL:           http://apr.apache.org/
 BuildRequires: autoconf >= 2.13
+BuildRequires: automake
 BuildRequires: libtool >= 1.3.3
-BuildRequires: perl-base
+BuildRequires: libuuid-devel
+BuildRequires: sed >= 4.0
+BuildRequires: python
 BuildRoot:     %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
 
 %define                _includedir     /usr/include/apr
@@ -32,7 +46,7 @@ take advantage of platform-specific deficiencies or features.
 
 %description -l pl
 Celem projektu APR (Apache Portable Runtime) jest stworzenie i
-utrzymywanie bibliotek dostarcaj±cych przewidywalnego i spójnego
+utrzymywanie bibliotek dostarczaj±cych przewidywalnego i spójnego
 interfejsu do le¿±cych u podstaw implementacji zale¿nych od platformy.
 G³ównym celem jest dostarczenie API, którego mog± u¿ywaæ programi¶ci
 maj±c pewno¶æ, ¿e zachowuje siê w sposób przewidywalny, je¶li nie
@@ -46,6 +60,9 @@ Summary:      Header files and development documentation for apr
 Summary(pl):   Pliki nag³ówkowe i dokumentacja programisty do apr
 Group:         Development/Libraries
 Requires:      %{name} = %{epoch}:%{version}-%{release}
+Requires:      libuuid-devel
+Requires:      automake
+Requires:      libtool
 
 %description devel
 Header files and development documentation for apr.
@@ -66,13 +83,37 @@ Static apr library.
 Statyczna biblioteka apr.
 
 %prep
-%setup -q -n %{name}
-%patch -p1 -b .orig
+%setup -q
+%patch0 -p1
+%patch1 -p1
+%patch2 -p1
+%{!?with_epoll:%patch3 -p1}
+
+cat >> config.layout <<'EOF'
+<Layout PLD>
+sbindir:       %{_sbindir}
+libexecdir:    %{_libdir}/apr
+installbuilddir: ${datadir}/build-${APR_MAJOR_VERSION}
+localstatedir: /var/run
+runtimedir:    /var/run
+libsuffix:     -${APR_MAJOR_VERSION}
+</Layout PLD>
+EOF
 
 %build
+install /usr/share/automake/config.* build
 ./buildconf
 %configure \
-       --enable-threads
+       %{!?with_tcpnodelaycork:apr_cv_tcp_nodelay_with_cork=no} \
+       %{!?with_sendfile64:ac_cv_func_sendfile64=no} \
+       --enable-layout=PLD \
+%ifarch %{ix86} %{i8664}
+%ifnarch i386
+       --enable-nonportable-atomics \
+%endif
+%endif
+       --enable-threads \
+       --with-devrandom=/dev/urandom
 %{__make}
 
 %install
@@ -83,10 +124,18 @@ rm -rf $RPM_BUILD_ROOT
 
 ln -sf %{_bindir}/libtool $RPM_BUILD_ROOT%{_datadir}/libtool
 
-install build/{*apr*.m4,*.awk,*.sh,config.*} $RPM_BUILD_ROOT%{_datadir}/build
+mv -f $RPM_BUILD_ROOT%{_datadir}/build-1 $RPM_BUILD_ROOT%{_datadir}/build
+install build/{*apr*.m4,*.awk,*.sh,gen-build.py} $RPM_BUILD_ROOT%{_datadir}/build
+ln -snf /usr/share/automake/config.{guess,sub} $RPM_BUILD_ROOT%{_datadir}/build
+ln -snf /usr/share/libtool/ltmain.sh $RPM_BUILD_ROOT%{_datadir}/build
+ln -snf /usr/bin/libtool $RPM_BUILD_ROOT%{_datadir}/build
+ln -sf build $RPM_BUILD_ROOT%{_datadir}/build-1
 
-%{__perl} -pi -e "s#$RPM_BUILD_DIR/%{name}#%{_datadir}#g" $RPM_BUILD_ROOT%{_bindir}/*
-%{__perl} -pi -e "s#$RPM_BUILD_DIR/%{name}.*#%{_datadir}/build#g" $RPM_BUILD_ROOT%{_datadir}/build/*
+sed -i -e 's@^\(APR_SOURCE_DIR=\).*@\1"%{_datadir}"@' \
+       $RPM_BUILD_ROOT%{_bindir}/apr-1-config
+sed -i -e 's@^\(apr_builddir\|apr_builders\)=.*@\1=%{_datadir}/build-1@' \
+       $RPM_BUILD_ROOT%{_datadir}/build/apr_rules.mk
+sed -i -e '1s@#!.*python@#!%{__python}@' $RPM_BUILD_ROOT%{_datadir}/build/gen-build.py
 
 %clean
 rm -rf $RPM_BUILD_ROOT
@@ -96,7 +145,7 @@ rm -rf $RPM_BUILD_ROOT
 
 %files
 %defattr(644,root,root,755)
-%doc CHANGES STATUS docs/*.html
+%doc CHANGES docs/*.html
 %attr(755,root,root) %{_libdir}/lib*.so.*.*
 
 %files devel
@@ -114,6 +163,9 @@ rm -rf $RPM_BUILD_ROOT
 %attr(755,root,root) %{_datadir}/build/config.*
 %attr(755,root,root) %{_datadir}/build/*.sh
 %attr(755,root,root) %{_datadir}/build/libtool
+%attr(755,root,root) %{_datadir}/build/gen-build.py
+%{_datadir}/build-1
+%{_pkgconfigdir}/apr-1.pc
 
 %files static
 %defattr(644,root,root,755)
This page took 0.036636 seconds and 4 git commands to generate.