1
2%define aprver 1
3
4Summary: Apache Portable Runtime library
5Name: apr
6Version: 1.5.1
7Release: 1
8License: Apache Software License
9Group: System Environment/Libraries
10URL: http://apr.apache.org/
11Source0: http://www.apache.org/dist/apr/%{name}-%{version}.tar.bz2
12BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-buildroot
13BuildRequires: autoconf, libtool, doxygen, python
14
15%description
16The mission of the Apache Portable Runtime (APR) is to provide a
17free library of C data structures and routines, forming a system
18portability layer to as many operating systems as possible,
19including Unices, MS Win32, BeOS and OS/2.
20
21%package devel
22Group: Development/Libraries
23Summary: APR library development kit
24Requires: apr = %{version}
25
26%description devel
27This package provides the support files which can be used to 
28build applications using the APR library.  The mission of the
29Apache Portable Runtime (APR) is to provide a free library of 
30C data structures and routines.
31
32%prep
33%setup -q
34
35%build
36# regenerate configure script etc.
37./buildconf
38%configure \
39        --prefix=/usr \
40        --includedir=%{_includedir}/apr-%{aprver} \
41        --with-installbuilddir=%{_libdir}/apr/build-%{aprver} \
42        --with-devrandom=/dev/urandom \
43        CC=gcc CXX=g++
44make %{?_smp_mflags} && make dox
45
46%check
47# Run non-interactive tests
48pushd test
49make %{?_smp_mflags} all CFLAGS=-fno-strict-aliasing
50make check || exit 1
51popd
52
53%install
54rm -rf $RPM_BUILD_ROOT
55make install DESTDIR=$RPM_BUILD_ROOT
56
57# Move docs to more convenient location
58mv docs/dox/html html
59
60# Unpackaged files:
61rm -f $RPM_BUILD_ROOT%{_libdir}/apr.exp
62
63%clean
64rm -rf $RPM_BUILD_ROOT
65
66%post -p /sbin/ldconfig
67
68%postun -p /sbin/ldconfig
69
70%files
71%defattr(-,root,root,-)
72%doc CHANGES LICENSE NOTICE
73%{_libdir}/libapr-%{aprver}.so.*
74
75%files devel
76%defattr(-,root,root,-)
77%doc docs/APRDesign.html docs/canonical_filenames.html
78%doc docs/incomplete_types docs/non_apr_programs
79%doc --parents html
80%{_bindir}/apr*config
81%{_libdir}/libapr-%{aprver}.*a
82%{_libdir}/libapr-%{aprver}.so
83%dir %{_libdir}/apr
84%dir %{_libdir}/apr/build-%{aprver}
85%{_libdir}/apr/build-%{aprver}/*
86%{_libdir}/pkgconfig/apr-%{aprver}.pc
87%dir %{_includedir}/apr-%{aprver}
88%{_includedir}/apr-%{aprver}/*.h
89
90%changelog
91* Sat Aug 30 2008 Graham Leggett <minfrin@sharp.fm> 1.3.3
92- update to depend on the bzip2 binary
93- build depends on python
94
95* Tue Jun 22 2004 Graham Leggett <minfrin@sharp.fm> 1.0.0-1
96- update to support v1.0.0 of APR
97
98* Tue Jun 22 2004 Graham Leggett <minfrin@sharp.fm> 1.0.0-1
99- derived from Fedora Core apr.spec
100
101