summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGraham Leggett <minfrin@apache.org>2004-07-01 21:21:59 +0000
committerGraham Leggett <minfrin@apache.org>2004-07-01 21:21:59 +0000
commit885e9267f6d9fdddbe37205d33a67bbb1eb67c4d (patch)
tree003af44defa1e51607bc1c29c88cba6cf51101fc
parentde1954ca0505b68c84500c7e9d4482a30cf71dca (diff)
downloadapr-885e9267f6d9fdddbe37205d33a67bbb1eb67c4d.tar.gz
Add an RPM spec file derived from Fedora Core.
PR: Obtained from: Submitted by: Reviewed by: jorton git-svn-id: https://svn.apache.org/repos/asf/apr/apr/trunk@65255 13f79535-47bb-0310-9956-ffa450edef68
-rw-r--r--CHANGES3
-rw-r--r--build/rpm/apr.spec.in103
-rwxr-xr-xbuildconf16
3 files changed, 122 insertions, 0 deletions
diff --git a/CHANGES b/CHANGES
index 2e82371e1..d59e09436 100644
--- a/CHANGES
+++ b/CHANGES
@@ -7,6 +7,9 @@ Changes for APR 1.1 [Deferring these features when 1.0 is rolled out.]
Changes with APR 1.0
+ *) Add an RPM spec file derived from Fedora Core.
+ [Graham Leggett, Joe Orton]
+
*) Fix apr_threadattr_detach_set() on Mac OS X. PR 28472.
[INOUE Seiichiro <inoue ariel-networks.com>]
diff --git a/build/rpm/apr.spec.in b/build/rpm/apr.spec.in
new file mode 100644
index 000000000..050cf31bd
--- /dev/null
+++ b/build/rpm/apr.spec.in
@@ -0,0 +1,103 @@
+
+%define aprver 1
+
+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
+Conflicts: subversion < 0.20.1-2
+
+%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}
+Conflicts: subversion-devel < 0.20.1-2
+
+%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 \
+ --with-devrandom=/dev/urandom \
+ CC=gcc CXX=g++
+make %{?_smp_mflags} && make dox
+
+%check
+# Run non-interactive tests
+%ifarch x86_64
+# https://bugzilla.redhat.com/bugzilla/show_bug.cgi?id=97611
+excludes=testlock
+%endif
+pushd test
+make %{?_smp_mflags} testall CFLAGS=-fno-strict-aliasing
+TZ=PST8PDT ./testall -v ${excludes+-x $excludes} || 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
+
+# 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
+%{_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
+%{_bindir}/apr-%{aprver}-config
+%{_libdir}/libapr-%{aprver}.*a
+%{_libdir}/libapr-%{aprver}.so
+%dir %{_libdir}/apr
+%dir %{_libdir}/apr/build
+%{_libdir}/apr/build/*
+%{_libdir}/pkgconfig/apr-%{aprver}.pc
+%dir %{_includedir}/apr-%{aprver}
+%{_includedir}/apr-%{aprver}/*.h
+
+%changelog
+* 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 e3ecfff65..b16441f4a 100755
--- a/buildconf
+++ b/buildconf
@@ -83,4 +83,20 @@ rm -rf autom4te*.cache
echo "Generating 'make' outputs ..."
build/gen-build.py make
+# 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