From f54208ac441ce3abce08a0344f11ea3c4b34a195 Mon Sep 17 00:00:00 2001 From: Graham Leggett Date: Sat, 12 Apr 2003 17:28:55 +0000 Subject: Add code to buildconf that produces an httpd.spec file from httpd.spec.in, using build/get-version.sh from APR. PR: Obtained from: Submitted by: Reviewed by: git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@99346 13f79535-47bb-0310-9956-ffa450edef68 --- buildconf | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) (limited to 'buildconf') diff --git a/buildconf b/buildconf index 71808600d0..3bfb09b274 100755 --- a/buildconf +++ b/buildconf @@ -181,4 +181,21 @@ echo rebuilding configure rm -f config.cache ${AUTOCONF:-autoconf} 2>&1 | grep -v "$cross_compile_warning" +if [ -f `which cut` ]; then + echo rebuilding rpm spec file + ( VMMN=`build/get-version.sh mmn include/ap_mmn.h MODULE_MAGIC_NUMBER` + REVISION=`build/get-version.sh all include/ap_release.h AP_SERVER` + 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/httpd.spec.in | \ + sed -e "s/APACHE_VERSION/$VERSION/" \ + -e "s/APACHE_RELEASE/$RELEASE/" \ + -e "s/APACHE_MMN/$VMMN/" \ + > httpd.spec ) +fi + exit 0 -- cgit v1.2.3