-%bcond_with epoll
-%bcond_with tcpnodelaycork
+#
+# Conditional build:
+#
Summary: Apache Portable Runtime
Summary(pl): Apache Portable Runtime - przeno¶na biblioteka uruchomieniowa
Name: apr
-Version: 1.2.2
-Release: 1
+Version: 1.2.7
+Release: 2
Epoch: 1
License: Apache v2.0
Group: Libraries
Source0: http://www.apache.org/dist/apr/%{name}-%{version}.tar.bz2
-# Source0-md5: c43d923b02cf1983106d694976be89c1
+# Source0-md5: e77887dbafc515c63feac84686bcb3bc
Patch0: %{name}-link.patch
Patch1: %{name}-metuxmpm.patch
-# EPOLL PATCH: TO BE DROPPED AFTER AC
-Patch2: %{name}-no-epoll.patch
+Patch2: %{name}-libtool.patch
URL: http://apr.apache.org/
BuildRequires: autoconf >= 2.13
BuildRequires: automake
BuildRequires: libtool >= 1.3.3
BuildRequires: libuuid-devel
-BuildRequires: perl-base
+BuildRequires: sed >= 4.0
BuildRequires: python
+Conflicts: kernel24
+Conflicts: kernel24-smp
BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
%define _includedir /usr/include/apr
%setup -q
%patch0 -p1
%patch1 -p1
-%{!?with_epoll:%patch2 -p1}
+%patch2 -p1
%build
install /usr/share/automake/config.* build
./buildconf
-# disable TCP_NODELAY|TCP_CORK for 2.4.x compatibility (to be dropped after Ac)
-# 2.4/2.6 kernels on sparc32 do not support sendfile64
%configure \
- %{!?with_tcpnodelaycork:apr_cv_tcp_nodelay_with_cork=no} \
-%ifarch sparc sparcv9
- ac_cv_func_sendfile64=no \
-%endif
--with-devrandom=/dev/urandom \
%ifarch %{ix86} %{i8664}
%ifnarch i386
ln -sf %{_bindir}/libtool $RPM_BUILD_ROOT%{_datadir}/libtool
mv -f $RPM_BUILD_ROOT%{_datadir}/build-1 $RPM_BUILD_ROOT%{_datadir}/build
-install build/{*apr*.m4,*.awk,*.sh} $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@^(APR_SOURCE_DIR=).*@$1"%{_datadir}"@' $RPM_BUILD_ROOT%{_bindir}/apr-config
-%{__perl} -pi -e 's@^(apr_builddir|apr_builders)=.*@$1=%{_datadir}/build-1@' \
+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
%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