From: Graham Leggett Date: Sun, 30 Mar 2003 18:57:35 +0000 (+0000) Subject: Added an RPM build script X-Git-Tag: pre_ajp_proxy~1949 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=d1977887991ea4cdb333d9772423959e147d8c99;p=thirdparty%2Fapache%2Fhttpd.git Added an RPM build script PR: Obtained from: Joe Orton Submitted by: Reviewed by: git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@99122 13f79535-47bb-0310-9956-ffa450edef68 --- diff --git a/CHANGES b/CHANGES index e0fb8257342..0a0c1a218bb 100644 --- a/CHANGES +++ b/CHANGES @@ -159,6 +159,9 @@ Changes with Apache 2.1.0-dev Changes with Apache 2.0.45 + *) Added an rpm build script. + [Graham Leggett, Joe Orton ] + *) Simpler, faster code path for request header scanning [Brian Pane] *) SECURITY: Eliminated leaks of several file descriptors to child diff --git a/build/rpm/httpd.init b/build/rpm/httpd.init new file mode 100755 index 00000000000..d6c3f2564ee --- /dev/null +++ b/build/rpm/httpd.init @@ -0,0 +1,111 @@ +#!/bin/bash +# +# Startup script for the Apache Web Server +# +# chkconfig: - 85 15 +# description: Apache is a World Wide Web server. It is used to serve \ +# HTML files and CGI. +# processname: httpd +# pidfile: /var/run/httpd.pid +# config: /etc/httpd/conf/httpd.conf + +# Source function library. +. /etc/rc.d/init.d/functions + +if [ -f /etc/sysconfig/httpd ]; then + . /etc/sysconfig/httpd +fi + +# This will prevent initlog from swallowing up a pass-phrase prompt if +# mod_ssl needs a pass-phrase from the user. +INITLOG_ARGS="" + +# Set HTTPD=/usr/sbin/httpd.worker in /etc/sysconfig/httpd to use a server +# with the thread-based "worker" MPM; BE WARNED that some modules may not +# work correctly with a thread-based MPM; notably PHP will refuse to start. + +# Path to the apachectl script, server binary, and short-form for messages. +apachectl=/usr/sbin/apachectl +httpd=${HTTPD-/usr/sbin/httpd} +prog=httpd +RETVAL=0 + +# check for 1.3 configuration +check13 () { + CONFFILE=/etc/httpd/conf/httpd.conf + GONE="(ServerType|BindAddress|Port|AddModule|ClearModuleList|" + GONE="${GONE}AgentLog|RefererLog|RefererIgnore|FancyIndexing|" + GONE="${GONE}AccessConfig|ResourceConfig)" + if grep -Eiq "^[[:space:]]*($GONE)" $CONFFILE; then + echo + echo 1>&2 " Apache 1.3 configuration directives found" + echo 1>&2 " please read @docdir@/migration.html" + failure "Apache 1.3 config directives test" + echo + exit 1 + fi +} + +# The semantics of these two functions differ from the way apachectl does +# things -- attempting to start while running is a failure, and shutdown +# when not running is also a failure. So we just do it the way init scripts +# are expected to behave here. +start() { + echo -n $"Starting $prog: " + check13 || exit 1 + daemon $httpd $OPTIONS + RETVAL=$? + echo + [ $RETVAL = 0 ] && touch /var/lock/subsys/httpd + return $RETVAL +} +stop() { + echo -n $"Stopping $prog: " + killproc $httpd + RETVAL=$? + echo + [ $RETVAL = 0 ] && rm -f /var/lock/subsys/httpd /var/run/httpd.pid +} +reload() { + echo -n $"Reloading $prog: " + check13 || exit 1 + killproc $httpd -HUP + RETVAL=$? + echo +} + +# See how we were called. +case "$1" in + start) + start + ;; + stop) + stop + ;; + status) + status $httpd + RETVAL=$? + ;; + restart) + stop + start + ;; + condrestart) + if [ -f /var/run/httpd.pid ] ; then + stop + start + fi + ;; + reload) + reload + ;; + graceful|help|configtest|fullstatus) + $apachectl $@ + RETVAL=$? + ;; + *) + echo $"Usage: $prog {start|stop|restart|condrestart|reload|status|fullstatus|graceful|help|configtest}" + exit 1 +esac + +exit $RETVAL diff --git a/build/rpm/httpd.logrotate b/build/rpm/httpd.logrotate new file mode 100644 index 00000000000..dd0ce1b9a96 --- /dev/null +++ b/build/rpm/httpd.logrotate @@ -0,0 +1,8 @@ +/var/log/httpd/*log { + missingok + notifempty + sharedscripts + postrotate + /bin/kill -HUP `cat /var/run/httpd.pid 2>/dev/null` 2> /dev/null || true + endscript +} diff --git a/build/rpm/httpd.spec.in b/build/rpm/httpd.spec.in new file mode 100644 index 00000000000..295f7d0445c --- /dev/null +++ b/build/rpm/httpd.spec.in @@ -0,0 +1,504 @@ +%define contentdir /var/www +%define suexec_caller apache +%define mmn APACHE_MMN + +%ifarch ia64 +# disable debuginfo on IA64 +%define debug_package %{nil} +%endif + +Summary: Apache HTTP Server +Name: httpd +Version: APACHE_VERSION +Release: APACHE_RELEASE +URL: http://httpd.apache.org/ +Vendor: Red Hat, Inc. +Source0: http://www.apache.org/dist/httpd/httpd-%{version}.tar.gz +License: Apache Software License +Group: System Environment/Daemons +BuildRoot: %{_tmppath}/%{name}-root +BuildPrereq: db4-devel, expat-devel, findutils, perl, pkgconfig +Requires: /etc/mime.types, gawk, /usr/share/magic.mime, /usr/bin/find +Prereq: /sbin/chkconfig, /bin/mktemp, /bin/rm, /bin/mv +Prereq: sh-utils, textutils, /usr/sbin/useradd +Provides: webserver +Provides: httpd-mmn = %{mmn} +Conflicts: thttpd +Obsoletes: apache, secureweb, mod_dav + +%description +Apache is a powerful, full-featured, efficient, and freely-available +Web server. Apache is also the most popular Web server on the +Internet. + +%package devel +Group: Development/Libraries +Summary: Development tools for the Apache HTTP server. +Obsoletes: secureweb-devel, apache-devel +Requires: libtool, httpd = %{version} + +%description devel +The httpd-devel package contains the APXS binary and other files +that you need to build Dynamic Shared Objects (DSOs) for Apache. + +If you are installing the Apache HTTP server and you want to be +able to compile or develop additional modules for Apache, you need +to install this package. + +%package manual +Group: Documentation +Summary: Documentation for the Apache HTTP server. +Obsoletes: secureweb-manual, apache-manual + +%description manual +The httpd-manual package contains the complete manual and +reference guide for the Apache HTTP server. The information can +also be found at http://httpd.apache.org/docs/. + +%package -n mod_ssl +Group: System Environment/Daemons +Summary: SSL/TLS module for the Apache HTTP server +Serial: 1 +BuildPrereq: openssl-devel +Prereq: openssl, dev, /bin/cat +Requires: httpd, make, httpd-mmn = %{mmn} + +%description -n mod_ssl +The mod_ssl module provides strong cryptography for the Apache Web +server via the Secure Sockets Layer (SSL) and Transport Layer +Security (TLS) protocols. + +%prep +%setup -q + +# Safety check: prevent build if defined MMN does not equal upstream MMN. +vmmn=`echo MODULE_MAGIC_NUMBER_MAJOR | cpp -include \`pwd\`/include/ap_mmn.h | grep -e '^[0-9]'` +if test x${vmmn} != x%{mmn}; then + : Error: Upstream MMN is now ${vmmn}, packaged MMN is %{mmn}. + : Update the mmn macro and rebuild. + exit 1 +fi + +# regenerate configure scripts +./buildconf + +# Before configure; fix location of build dir in generated apxs +%{__perl} -pi -e "s:\@exp_installbuilddir\@:%{_libdir}/httpd/build:g" \ + support/apxs.in + +%build + +if pkg-config openssl ; then + # configure -C barfs with trailing spaces in CFLAGS + CFLAGS="$RPM_OPT_FLAGS `pkg-config --cflags openssl | sed 's/ *$//'`" + AP_LIBS="$AP_LIBS `pkg-config --libs openssl`" +else + CFLAGS="$RPM_OPT_FLAGS" + AP_LIBS="-lssl -lcrypto" +fi +export CFLAGS +export AP_LIBS + +function mpmbuild() +{ +mpm=$1; shift +mkdir $mpm; pushd $mpm +cat > config.cache < prefork.mods +./worker/httpd -l | grep -v worker > worker.mods +if ! diff -u prefork.mods worker.mods; then + : Different modules built into httpd binaries, will not proceed + exit 1 +fi + +%install +rm -rf $RPM_BUILD_ROOT + +# Classify ab and logresolve as section 1 commands, as they are in /usr/bin +mv docs/man/ab.8 docs/man/ab.1 +sed -e "1s/logresolve 8/logresolve 1/" \ + < docs/man/logresolve.8 > docs/man/logresolve.1 +rm docs/man/logresolve.8 + +pushd prefork +make DESTDIR=$RPM_BUILD_ROOT install +popd +# install worker binary +install -m 755 worker/.libs/httpd $RPM_BUILD_ROOT%{_sbindir}/httpd.worker + +# mod_ssl bits +for suffix in crl crt csr key prm; do + mkdir $RPM_BUILD_ROOT%{_sysconfdir}/httpd/conf/ssl.${suffix} +done + +# Makefiles for certificate management +#for ext in crt crl; do +# install -m 644 ./build/rpm/mod_ssl-Makefile.${ext} \ +# $RPM_BUILD_ROOT%{_sysconfdir}/httpd/conf/ssl.${ext}/Makefile.${ext} +#done +#ln -s ../../../usr/share/ssl/certs/Makefile $RPM_BUILD_ROOT/etc/httpd/conf + +# for holding mod_dav lock database +mkdir -p $RPM_BUILD_ROOT%{_localstatedir}/lib/dav + +# create a prototype session cache +mkdir -p $RPM_BUILD_ROOT%{_localstatedir}/cache/mod_ssl +touch $RPM_BUILD_ROOT%{_localstatedir}/cache/mod_ssl/scache.{dir,pag,sem} + +# move utilities to /usr/bin +mv $RPM_BUILD_ROOT%{_sbindir}/{ab,htdbm,logresolve,htpasswd,htdigest} \ + $RPM_BUILD_ROOT%{_bindir} + +# make libtool a symlink +mv $RPM_BUILD_ROOT%{contentdir}/build $RPM_BUILD_ROOT%{_libdir}/httpd/build +rm $RPM_BUILD_ROOT%{_libdir}/httpd/build/libtool +ln -s ../../../..%{_bindir}/libtool $RPM_BUILD_ROOT%{_libdir}/httpd/build/libtool + +# fix up config_vars file: relocate the build directory into libdir; +# reference correct libtool; remove references to RPM build root. +sed -e "s|%{contentdir}/build|%{_libdir}/httpd/build|g" \ + -e "/AP_LIBS/d" -e "/abs_srcdir/d" \ + -e "/^LIBTOOL/s|/[^ ]*/libtool|%{_bindir}/libtool|" \ + -e "/^EXTRA_INCLUDES/s|-I$RPM_BUILD_DIR[^ ]* ||g" \ + < prefork/build/config_vars.mk \ + > $RPM_BUILD_ROOT%{_libdir}/httpd/build/config_vars.mk + +# Make the MMN accessible to module packages +echo %{mmn} > $RPM_BUILD_ROOT%{_includedir}/httpd/.mmn + +# docroot +mkdir $RPM_BUILD_ROOT%{contentdir}/html +rm -r $RPM_BUILD_ROOT%{contentdir}/manual/style +rm $RPM_BUILD_ROOT%{contentdir}/manual/*/*.xml + +# logs +rmdir $RPM_BUILD_ROOT%{_sysconfdir}/httpd/logs +mkdir -p $RPM_BUILD_ROOT%{_localstatedir}/log/httpd + +# symlinks for /etc/httpd +ln -s ../..%{_localstatedir}/log/httpd $RPM_BUILD_ROOT/etc/httpd/logs +ln -s ../..%{_localstatedir}/run $RPM_BUILD_ROOT/etc/httpd/run +ln -s ../..%{_libdir}/httpd/modules $RPM_BUILD_ROOT/etc/httpd/modules +ln -s ../..%{_libdir}/httpd/build $RPM_BUILD_ROOT/etc/httpd/build + +# install SYSV init stuff +mkdir -p $RPM_BUILD_ROOT/etc/rc.d/init.d +install -m755 ./build/rpm/httpd.init \ + $RPM_BUILD_ROOT/etc/rc.d/init.d/httpd +%{__perl} -pi -e "s:\@docdir\@:%{_docdir}/%{name}-%{version}:g" \ + $RPM_BUILD_ROOT/etc/rc.d/init.d/httpd + +# install log rotation stuff +mkdir -p $RPM_BUILD_ROOT/etc/logrotate.d +install -m644 ./build/rpm/httpd.logrotate \ + $RPM_BUILD_ROOT/etc/logrotate.d/httpd + +# Remove unpackaged files +rm -rf $RPM_BUILD_ROOT%{_libdir}/libapr{,util}.{a,la} \ + $RPM_BUILD_ROOT%{_libdir}/APRVARS $RPM_BUILD_ROOT%{_libdir}/*.exp \ + $RPM_BUILD_ROOT/etc/httpd/conf/mime.types \ + $RPM_BUILD_ROOT%{_libdir}/httpd/modules/*.exp \ + $RPM_BUILD_ROOT%{_bindir}/ap?-config \ + $RPM_BUILD_ROOT%{_sbindir}/{checkgid,dbmmanage,envvars*} \ + $RPM_BUILD_ROOT%{contentdir}/htdocs/* \ + $RPM_BUILD_ROOT%{contentdir}/cgi-bin/* + +%pre +# Add the "apache" user +/usr/sbin/useradd -c "Apache" -u 48 \ + -s /sbin/nologin -r -d %{contentdir} apache 2> /dev/null || : + +%triggerpostun -- apache < 2.0 +/sbin/chkconfig --add httpd + +%post +# Register the httpd service +/sbin/chkconfig --add httpd + +%preun +if [ $1 = 0 ]; then + /sbin/service httpd stop > /dev/null 2>&1 + /sbin/chkconfig --del httpd +fi + +%post -n mod_ssl +/sbin/ldconfig ### is this needed? +umask 077 + +if [ ! -f %{_sysconfdir}/httpd/conf/ssl.key/server.key ] ; then +%{_bindir}/openssl genrsa -rand /proc/apm:/proc/cpuinfo:/proc/dma:/proc/filesystems:/proc/interrupts:/proc/ioports:/proc/pci:/proc/rtc:/proc/uptime 1024 > %{_sysconfdir}/httpd/conf/ssl.key/server.key 2> /dev/null +fi + +FQDN=`hostname` +if [ "x${FQDN}" = "x" ]; then + FQDN=localhost.localdomain +fi + +if [ ! -f %{_sysconfdir}/httpd/conf/ssl.crt/server.crt ] ; then +cat << EOF | %{_bindir}/openssl req -new -key %{_sysconfdir}/httpd/conf/ssl.key/server.key -x509 -days 365 -out %{_sysconfdir}/httpd/conf/ssl.crt/server.crt 2>/dev/null +-- +SomeState +SomeCity +SomeOrganization +SomeOrganizationalUnit +${FQDN} +root@${FQDN} +EOF +fi + +%clean +rm -rf $RPM_BUILD_ROOT + +%files +%defattr(-,root,root) + +%doc ABOUT_APACHE README CHANGES LICENSE + +%dir %{_sysconfdir}/httpd +%{_sysconfdir}/httpd/modules +%{_sysconfdir}/httpd/logs +%{_sysconfdir}/httpd/run +%dir %{_sysconfdir}/httpd/conf +%config(noreplace) %{_sysconfdir}/httpd/conf/*.conf +%config(noreplace) %{_sysconfdir}/httpd/conf/magic + +%config %{_sysconfdir}/logrotate.d/httpd +%config %{_sysconfdir}/rc.d/init.d/httpd + +#%dir %{_sysconfdir}/httpd/conf + +%{_bindir}/ab +%{_bindir}/ht* +%{_bindir}/logresolve +%{_sbindir}/httpd +%{_sbindir}/httpd.worker +%{_sbindir}/apachectl +%{_sbindir}/rotatelogs +%attr(4510,root,%{suexec_caller}) %{_sbindir}/suexec + +%{_libdir}/libapr-0.so.* +%{_libdir}/libaprutil-0.so.* + +%dir %{_libdir}/httpd +%dir %{_libdir}/httpd/modules +# everything but mod_ssl.so: +%{_libdir}/httpd/modules/mod_[a-r]*.so +%{_libdir}/httpd/modules/mod_s[petu]*.so +%{_libdir}/httpd/modules/mod_[t-z]*.so + +%dir %{contentdir} +%dir %{contentdir}/cgi-bin +%dir %{contentdir}/html +%dir %{contentdir}/icons +%dir %{contentdir}/error +%dir %{contentdir}/error/include +%{contentdir}/icons/* +%config(noreplace) %{contentdir}/error/*.var +%config(noreplace) %{contentdir}/error/include/*.html + +%attr(0700,root,root) %dir %{_localstatedir}/log/httpd + +%attr(0700,apache,apache) %dir %{_localstatedir}/lib/dav + +%{_mandir}/man1/* + +%{_mandir}/man8/rotatelogs* +%{_mandir}/man8/suexec* + +%files manual +%defattr(-,root,root) +%{contentdir}/manual + +%files -n mod_ssl +%defattr(-,root,root) +%{_libdir}/httpd/modules/mod_ssl.so +%config(noreplace) %{_sysconfdir}/httpd/conf/ssl.conf +%attr(0700,root,root) %dir %{_sysconfdir}/httpd/conf/ssl.* +#%config %{_sysconfdir}/httpd/conf/Makefile +#%dir %{_sysconfdir}/httpd/conf/ssl.* +%attr(0700,apache,root) %dir %{_localstatedir}/cache/mod_ssl +%attr(0600,apache,root) %ghost %{_localstatedir}/cache/mod_ssl/scache.dir +%attr(0600,apache,root) %ghost %{_localstatedir}/cache/mod_ssl/scache.pag +%attr(0600,apache,root) %ghost %{_localstatedir}/cache/mod_ssl/scache.sem + +%files devel +%defattr(-,root,root) +%{_libdir}/libapr-0.so +%{_libdir}/libaprutil-0.so +%{_includedir}/httpd +%{_sysconfdir}/httpd/build +%{_sbindir}/apxs +%{_mandir}/man8/apxs.8* +%dir %{_libdir}/httpd/build +%{_libdir}/httpd/build/*.mk +%{_libdir}/httpd/build/instdso.sh +%{_libdir}/httpd/build/libtool + +%changelog +* Sun Mar 30 2003 Graham Leggett 2.0.45-1 +- Created generic Apache rpm spec file from that donated by Redhat. +- Removed Redhat specific patches and boilerplate files. +- Removed SSL related Makefiles. + +* Mon Feb 24 2003 Joe Orton 2.0.40-21 +- add security fix for CAN-2003-0020; replace non-printable characters + with '!' when printing to error log. +- disable debuginfo on IA64. + +* Tue Feb 11 2003 Joe Orton 2.0.40-20 +- disable POSIX semaphores to support 2.4.18 kernel (#83324) + +* Wed Jan 29 2003 Joe Orton 2.0.40-19 +- require xmlto 0.0.11 or later +- fix apr_strerror on glibc2.3 + +* Wed Jan 22 2003 Tim Powers 2.0.40-18 +- rebuilt + +* Thu Jan 16 2003 Joe Orton 2.0.40-17 +- add mod_cgid and httpd binary built with worker MPM (#75496) +- allow choice of httpd binary in init script +- pick appropriate CGI module based on loaded MPM in httpd.conf +- source /etc/sysconfig/httpd in apachectl to get httpd choice +- make "apachectl status" fail gracefully when links isn't found (#78159) + +* Mon Jan 13 2003 Joe Orton 2.0.40-16 +- rebuild for OpenSSL 0.9.7 + +* Fri Jan 3 2003 Joe Orton 2.0.40-15 +- fix possible infinite recursion in config dir processing (#77206) +- fix memory leaks in request body processing (#79282) + +* Thu Dec 12 2002 Joe Orton 2.0.40-14 +- remove unstable shmht session cache from mod_ssl +- get SSL libs from pkg-config if available (Nalin Dahyabhai) +- stop "apxs -a -i" from inserting AddModule into httpd.conf (#78676) + +* Wed Nov 6 2002 Joe Orton 2.0.40-13 +- fix location of installbuilddir in apxs when libdir!=/usr/lib + +* Wed Nov 6 2002 Joe Orton 2.0.40-12 +- pass libdir to configure; clean up config_vars.mk +- package instdso.sh, fixing apxs -i (#73428) +- prevent build if upstream MMN differs from mmn macro +- remove installed but unpackaged files + +* Wed Oct 9 2002 Joe Orton 2.0.40-11 +- correct SERVER_NAME encoding in i18n error pages (thanks to Andre Malo) + +* Wed Oct 9 2002 Joe Orton 2.0.40-10 +- fix patch for CAN-2002-0840 to also cover i18n error pages + +* Wed Oct 2 2002 Joe Orton 2.0.40-9 +- security fixes for CAN-2002-0840 and CAN-2002-0843 +- fix for possible mod_dav segfault for certain requests + +* Tue Sep 24 2002 Gary Benson +- updates to the migration guide + +* Wed Sep 4 2002 Nalin Dahyabhai 2.0.40-8 +- link httpd with libssl to avoid library loading/unloading weirdness + +* Tue Sep 3 2002 Joe Orton 2.0.40-7 +- add LoadModule lines for proxy modules in httpd.conf (#73349) +- fix permissions of conf/ssl.*/ directories; add Makefiles for + certificate management (#73352) + +* Mon Sep 2 2002 Joe Orton 2.0.40-6 +- provide "httpd-mmn" to manage module ABI compatibility + +* Sun Sep 1 2002 Joe Orton 2.0.40-5 +- fix SSL session cache (#69699) +- revert addition of LDAP support to apr-util + +* Mon Aug 26 2002 Joe Orton 2.0.40-4 +- set SIGXFSZ disposition to "ignored" (#69520) +- make dummy connections to the first listener in config (#72692) + +* Mon Aug 26 2002 Joe Orton 2.0.40-3 +- allow "apachectl configtest" on a 1.3 httpd.conf +- add mod_deflate +- enable LDAP support in apr-util +- don't package everything in /var/www/error as config(noreplace) + +* Wed Aug 21 2002 Bill Nottingham 2.0.40-2 +- add trigger (#68657) + +* Mon Aug 12 2002 Joe Orton 2.0.40-1 +- update to 2.0.40 + +* Wed Jul 24 2002 Joe Orton 2.0.36-8 +- improve comment on use of UserDir in default config (#66886) + +* Wed Jul 10 2002 Joe Orton 2.0.36-7 +- use /sbin/nologin as shell for apache user (#68371) +- add patch from CVS to fix possible infinite loop when processing + internal redirects + +* Wed Jun 26 2002 Gary Benson 2.0.36-6 +- modify init script to detect 1.3.x httpd.conf's and direct users + to the migration guide + +* Tue Jun 25 2002 Gary Benson 2.0.36-5 +- patch apachectl to detect 1.3.x httpd.conf's and direct users + to the migration guide +- ship the migration guide + +* Fri Jun 21 2002 Joe Orton +- move /etc/httpd2 back to /etc/httpd +- add noindex.html page and poweredby logo; tweak default config + to load noindex.html if no default "/" page is present. +- add patch to prevent mutex errors on graceful restart + +* Fri Jun 21 2002 Tim Powers 2.0.36-4 +- automated rebuild + +* Wed Jun 12 2002 Joe Orton 2.0.36-3 +- add patch to fix SSL mutex handling + +* Wed Jun 12 2002 Joe Orton 2.0.36-2 +- improved config directory patch + +* Mon May 20 2002 Joe Orton +- initial build; based heavily on apache.spec and mod_ssl.spec +- fixes: #65214, #58490, #57376, #61265, #65518, #58177, #57245 diff --git a/buildconf b/buildconf index 71808600d05..8854a7679ea 100755 --- a/buildconf +++ b/buildconf @@ -181,4 +181,19 @@ echo rebuilding configure rm -f config.cache ${AUTOCONF:-autoconf} 2>&1 | grep -v "$cross_compile_warning" +echo rebuilding rpm spec file +( VMMN=`echo MODULE_MAGIC_NUMBER_MAJOR | cpp -include \`pwd\`/include/ap_mmn.h | grep -e '^[0-9]'` + REVISION=`echo AP_SERVER_MAJORVERSION.AP_SERVER_MINORVERSION.AP_SERVER_PATCHLEVEL | cpp -include \`pwd\`/include/ap_release.h | tr -d "\" " | grep -e '^[0-9.\-]'` + 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 ) + exit 0