]> git.pld-linux.org Git - packages/apr.git/blobdiff - apr.spec
Up to 1.7.4
[packages/apr.git] / apr.spec
index 642c4bbed0bfd9ad903d097e77b06d54ee322d27..853ff294e55b23874c94c1cd63c90feab18a7e8a 100644 (file)
--- a/apr.spec
+++ b/apr.spec
@@ -1,26 +1,45 @@
+#
+# 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.2
-Release:       2
+Version:       1.7.4
+Release:       1
 Epoch:         1
 License:       Apache v2.0
 Group:         Libraries
 Source0:       http://www.apache.org/dist/apr/%{name}-%{version}.tar.bz2
-# Source0-md5: a0631c63640176371dd4a5bf13beeee8
+# Source0-md5: f8a62f3984898ba0ea8b6f26b851cb99
 Patch0:                %{name}-link.patch
-Patch1:                %{name}-metuxmpm.patch
-Patch2:                %{name}-libtool.patch
+
+# disable some things that require recent kernel
+Patch2:                %{name}-disable-features.patch
 URL:           http://apr.apache.org/
-BuildRequires: autoconf >= 2.13
+BuildRequires: autoconf >= 2.59
 BuildRequires: automake
+%if "%{pld_release}" != "ac"
+BuildRequires: glibc-devel >= 6:2.9
 BuildRequires: libtool >= 2:2.2
+%else
+BuildRequires: libtool
+%endif
+%ifarch armv3l %{armv4} %{armv5} %{armv6}
+BuildRequires: libatomic-devel
+%endif
 BuildRequires: libuuid-devel
-BuildRequires: sed >= 4.0
 BuildRequires: python
+BuildRequires: rpm >= 4.4.9-56
 BuildRequires: rpm-pythonprov
+BuildRequires: rpmbuild(macros) >= 2.007
+BuildRequires: sed >= 4.0
+%if "%{pld_release}" != "ac"
 BuildRequires: uname(release) >= 2.6
-Requires:      uname(release) >= 2.6
+Requires:      uname(release) >= 2.6.28
+%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)
@@ -54,9 +73,13 @@ Summary:     Header files and development documentation for apr
 Summary(pl.UTF-8):     Pliki nagłówkowe i dokumentacja programisty do apr
 Group:         Development/Libraries
 Requires:      %{name} = %{epoch}:%{version}-%{release}
-Requires:      libuuid-devel
 Requires:      automake
+%if "%{pld_release}" != "ac"
 Requires:      libtool >= 2:2.2
+%else
+Requires:      libtool
+%endif
+Requires:      libuuid-devel
 Requires:      python-modules
 
 %description devel
@@ -80,7 +103,7 @@ Statyczna biblioteka apr.
 %prep
 %setup -q
 %patch0 -p1
-%patch1 -p1
+
 %patch2 -p1
 
 cat >> config.layout <<'EOF'
@@ -96,30 +119,39 @@ EOF
 
 %build
 install /usr/share/automake/config.* build
+%{__autoconf}
 
 %configure \
+%ifarch armv3l %{armv4} %{armv5} %{armv6}
+       LIBS="-latomic" \
+%endif
        --enable-layout=PLD \
-%ifarch %{ix86} %{i8664}
+%ifarch %{ix86} %{x8664}
 %ifnarch i386
        --enable-nonportable-atomics \
 %endif
 %endif
+       --enable-pool-concurrency-check \
        --enable-threads \
        --with-devrandom=/dev/urandom
 %{__make}
 
+%{?with_tests:%{__make} -j1 check}
+
 %install
 rm -rf $RPM_BUILD_ROOT
 
 %{__make} install \
        DESTDIR=$RPM_BUILD_ROOT
 
-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,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
 
This page took 1.048392 seconds and 4 git commands to generate.