summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorminfrin <minfrin@13f79535-47bb-0310-9956-ffa450edef68>2004-12-16 19:14:30 +0000
committerminfrin <minfrin@13f79535-47bb-0310-9956-ffa450edef68>2004-12-16 19:14:30 +0000
commitce3f106cf200885a67ff1952dd4ae098e11ef601 (patch)
tree02beb5cc105283bfbe0fde419b2427973694dbc1
parent53534485f0d6e8f59901c01bec18528184a8e870 (diff)
downloadlibapr-ce3f106cf200885a67ff1952dd4ae098e11ef601.tar.gz
Add an RPM spec file.
git-svn-id: http://svn.apache.org/repos/asf/apr/apr/branches/0.9.x@122568 13f79535-47bb-0310-9956-ffa450edef68
-rw-r--r--CHANGES2
-rw-r--r--build/rpm/apr.spec.in105
-rwxr-xr-xbuildconf16
3 files changed, 123 insertions, 0 deletions
diff --git a/CHANGES b/CHANGES
index 4563610cd..f4aff7689 100644
--- a/CHANGES
+++ b/CHANGES
@@ -1,5 +1,7 @@
Changes with APR 0.9.6
+ *) Add an RPM spec file. [Graham Leggett]
+
*) Add a build script to create a solaris package. [Graham Leggett]
Changes with APR 0.9.5
diff --git a/build/rpm/apr.spec.in b/build/rpm/apr.spec.in
new file mode 100644
index 000000000..dd0c27351
--- /dev/null
+++ b/build/rpm/apr.spec.in
@@ -0,0 +1,105 @@
+
+%define aprver 0
+
+Summary: Apache Portable Runtime library
+Name: apr
+Version: APR_VERSION
+Release: APR_RELEASE
+License: Apache Software License
+Group: System Environment/Libraries
+URL: http://apr.apache.org/
+Source0: %{name}-%{version}.tar.gz
+BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-buildroot
+BuildPrereq: autoconf, libtool, doxygen
+
+%description
+The mission of the Apache Portable Runtime (APR) is to provide a
+free library of C data structures and routines, forming a system
+portability layer to as many operating systems as possible,
+including Unices, MS Win32, BeOS and OS/2.
+
+%package devel
+Group: Development/Libraries
+Summary: APR library development kit
+Requires: apr = %{version}
+
+%description devel
+This package provides the support files which can be used to
+build applications using the APR library. The mission of the
+Apache Portable Runtime (APR) is to provide a free library of
+C data structures and routines.
+
+%prep
+%setup -q
+
+%build
+# regenerate configure script etc.
+./buildconf
+%configure \
+ --prefix=/usr \
+ --includedir=%{_includedir}/apr-%{aprver} \
+ --with-installbuilddir=%{_libdir}/apr/build-%{aprver} \
+ --with-devrandom=/dev/urandom \
+ CC=gcc CXX=g++
+make %{?_smp_mflags} && make dox
+
+%check
+# Run non-interactive tests
+pushd test
+make %{?_smp_mflags} testall CFLAGS=-fno-strict-aliasing
+#./testall -v || exit 1
+popd
+
+%install
+rm -rf $RPM_BUILD_ROOT
+make install DESTDIR=$RPM_BUILD_ROOT
+
+# Move docs to more convenient location
+mv docs/dox/html html
+
+# Copy helper files for apr-util
+#mkdir $RPM_BUILD_ROOT%{_libdir}/apr/build-%{aprver}
+cp build/apr_common.m4 build/find_apr.m4 build/install.sh \
+ build/config.guess build/config.sub \
+ $RPM_BUILD_ROOT%{_libdir}/apr/build-%{aprver}
+
+# Unpackaged files:
+rm -f $RPM_BUILD_ROOT%{_libdir}/apr.exp
+
+%clean
+rm -rf $RPM_BUILD_ROOT
+
+%post -p /sbin/ldconfig
+
+%postun -p /sbin/ldconfig
+
+%files
+%defattr(-,root,root,-)
+%doc CHANGES LICENSE NOTICE
+%{_libdir}/libapr-%{aprver}.so.*
+
+%files devel
+%defattr(-,root,root,-)
+%doc docs/APRDesign.html docs/canonical_filenames.html
+%doc docs/incomplete_types docs/non_apr_programs
+%doc --parents html
+%{_bindir}/apr*config
+%{_libdir}/libapr-%{aprver}.*a
+%{_libdir}/libapr-%{aprver}.so
+%dir %{_libdir}/apr
+%dir %{_libdir}/apr/build-%{aprver}
+%{_libdir}/apr/build-%{aprver}/*
+#%{_libdir}/pkgconfig/apr-%{aprver}.pc
+%dir %{_includedir}/apr-%{aprver}
+%{_includedir}/apr-%{aprver}/*.h
+
+%changelog
+* Mon Dec 13 2004 Graham Leggett <minfrin@sharp.fm> 0.9.6-1
+- backport to support v0.9.6 of APR
+
+* Tue Jun 22 2004 Graham Leggett <minfrin@sharp.fm> 1.0.0-1
+- update to support v1.0.0 of APR
+
+* Tue Jun 22 2004 Graham Leggett <minfrin@sharp.fm> 1.0.0-1
+- derived from Fedora Core apr.spec
+
diff --git a/buildconf b/buildconf
index 6c74af1ef..bcbf0f6d9 100755
--- a/buildconf
+++ b/buildconf
@@ -71,4 +71,20 @@ ${AUTOCONF:-autoconf}
# Remove autoconf 2.5x's cache directory
rm -rf autom4te*.cache
+# Create RPM Spec file
+if [ -f `which cut` ]; then
+ echo rebuilding rpm spec file
+ ( REVISION=`build/get-version.sh all include/apr_version.h APR`
+ VERSION=`echo $REVISION | cut -d- -s -f1`
+ RELEASE=`echo $REVISION | cut -d- -s -f2`
+ if [ "x$VERSION" = "x" ]; then
+ VERSION=$REVISION
+ RELEASE=1
+ fi
+ cat ./build/rpm/apr.spec.in | \
+ sed -e "s/APR_VERSION/$VERSION/" \
+ -e "s/APR_RELEASE/$RELEASE/" \
+ > apr.spec )
+fi
+
exit 0