summaryrefslogtreecommitdiff
path: root/buildconf
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 /buildconf
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
Diffstat (limited to 'buildconf')
-rwxr-xr-xbuildconf16
1 files changed, 16 insertions, 0 deletions
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