+#
+# Conditional build:
+%bcond_with tests # perform make test
+#
Summary: Apache Portable Runtime
Summary(pl.UTF-8): Apache Portable Runtime - przenośna biblioteka uruchomieniowa
Name: apr
-Version: 1.3.3
+Version: 1.3.5
Release: 1
Epoch: 1
License: Apache v2.0
Group: Libraries
Source0: http://www.apache.org/dist/apr/%{name}-%{version}.tar.bz2
-# Source0-md5: 2090c21dee4f0eb1512604127dcd158f
+# Source0-md5: 9ac9a00eaa190937fdbbde7b4f03ac1e
Patch0: %{name}-link.patch
-Patch1: %{name}-metuxmpm.patch
-Patch2: %{name}-libtool.patch
+Patch1: %{name}-libtool.patch
+Patch2: %{name}-bug-46425.patch
URL: http://apr.apache.org/
-BuildRequires: autoconf >= 2.13
+BuildRequires: autoconf >= 2.50
BuildRequires: automake
+BuildRequires: glibc-devel >= 6:2.9
+%if "%{pld_release}" != "ac"
BuildRequires: libtool >= 2:2.2
+%else
+BuildRequires: libtool
+%endif
BuildRequires: libuuid-devel
-BuildRequires: sed >= 4.0
BuildRequires: python
+BuildRequires: rpm >= 4.4.9-56
BuildRequires: rpm-pythonprov
+BuildRequires: sed >= 4.0
+%if "%{pld_release}" != "ac"
BuildRequires: uname(release) >= 2.6
-Requires: uname(release) >= 2.6
+Requires: uname(release) >= 2.6.13
+%endif
+# uuid.h misdetected from this one instead of libuuid-devel
+BuildConflicts: ossp-uuid-devel < 1.6.2-6
Conflicts: kernel24
Conflicts: kernel24-smp
BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
Group: Development/Libraries
Requires: %{name} = %{epoch}:%{version}-%{release}
Requires: automake
+%if "%{pld_release}" != "ac"
Requires: libtool >= 2:2.2
+%else
+Requires: libtool
+%endif
Requires: libuuid-devel
Requires: python-modules
%build
install /usr/share/automake/config.* build
+%{__autoconf}
%configure \
--enable-layout=PLD \
-%ifarch %{ix86} %{i8664}
+%ifarch %{ix86} %{x8664}
%ifnarch i386
--enable-nonportable-atomics \
%endif
--with-devrandom=/dev/urandom
%{__make}
+%{?with_tests:%{__make} -j1 test}
+
%install
rm -rf $RPM_BUILD_ROOT
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/config/ltmain.sh $RPM_BUILD_ROOT%{_datadir}/build
+if [ -f /usr/share/libtool/config/ltmain.sh ]; then
+ ln -snf /usr/share/libtool/config/ltmain.sh $RPM_BUILD_ROOT%{_datadir}/build
+else
+ ln -snf /usr/share/libtool/ltmain.sh $RPM_BUILD_ROOT%{_datadir}/build
+fi
ln -snf /usr/bin/libtool $RPM_BUILD_ROOT%{_datadir}/build
ln -sf build $RPM_BUILD_ROOT%{_datadir}/build-1