Author: jfrederic.clere(a)jboss.com
Date: 2007-12-11 06:04:54 -0500 (Tue, 11 Dec 2007)
New Revision: 1169
Added:
trunk/build/unix/buildbin.rhel-httpd.sh
Log:
Add logic to build the sources.
Added: trunk/build/unix/buildbin.rhel-httpd.sh
===================================================================
--- trunk/build/unix/buildbin.rhel-httpd.sh (rev 0)
+++ trunk/build/unix/buildbin.rhel-httpd.sh 2007-12-11 11:04:54 UTC (rev 1169)
@@ -0,0 +1,127 @@
+#!/bin/sh
+# Copyright(c) 2007 Red Hat Middleware, LLC,
+# and individual contributors as indicated by the @authors tag.
+# See the copyright.txt in the distribution for a
+# full listing of individual contributors.
+#
+# This library is free software; you can redistribute it and/or
+# modify it under the terms of the GNU Lesser General Public
+# License as published by the Free Software Foundation; either
+# version 2 of the License, or (at your option) any later version.
+#
+# This library is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+# Lesser General Public License for more details.
+#
+# You should have received a copy of the GNU Lesser General Public
+# License along with this library in the file COPYING.LIB;
+# if not, write to the Free Software Foundation, Inc.,
+# 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA
+#
+# @author Jean-Frederic Clere
+# @author Mladen Turk
+#
+echo ""
+echo "Running : `basename $0` $LastChangedDate: 2007-07-02 16:22:00 +0200 (Mon, 02
Jul 2007) $"
+echo ""
+echo "Started : `date`"
+echo "Common : $1"
+echo "Prefix : $2"
+echo "Output : $3"
+echo "OpenSSL : $4"
+echo ""
+
+
+# parameters
+# $1: Location of the common libraries.
+# $2: Destination location.
+# $3: Location where to put the binaries.
+# $4: Use OpenSSL.
+
+common_loc=$1
+prefix_loc=$2
+output_loc=$3
+has_openssl=$4
+current_loc=`pwd`
+
+#
+# Function from the httpd.spec file
+# removed for easy testing.
+# --with-apr=${_prefix} --with-apr-util=${_prefix} \
+function mpmbuild()
+{
+mpm=$1; shift
+mkdir $mpm; pushd $mpm
+../configure \
+ --prefix=${_sysconfdir}/httpd \
+ --exec-prefix=${_prefix} \
+ --bindir=${_bindir} \
+ --sbindir=${_sbindir} \
+ --mandir=${_mandir} \
+ --libdir=${_libdir} \
+ --sysconfdir=${_sysconfdir}/httpd/conf \
+ --includedir=${_includedir}/httpd \
+ --libexecdir=${_libdir}/httpd/modules \
+ --datadir=${contentdir} \
+ --with-installbuilddir=${_libdir}/httpd/build \
+ --with-mpm=$mpm \
+ --enable-suexec --with-suexec \
+ --with-suexec-caller=${suexec_caller} \
+ --with-suexec-docroot=${contentdir} \
+ --with-suexec-logfile=${_localstatedir}/log/httpd/suexec.log \
+ --with-suexec-bin=${_sbindir}/suexec \
+ --with-suexec-uidmin=500 --with-suexec-gidmin=100 \
+ --enable-pie \
+ --with-pcre \
+ $*
+
+make
+popd
+}
+
+#
+# Set needed variables. (defaulted to hacked values).
+PREFIX=/opt/jboss/httpd
+_sysconfdir=${PREFIX}/conf
+_prefix=${PREFIX}
+_sbindir=${PREFIX}/sbin
+_bindir=${PREFIX}/bin
+_mandir=${PREFIX}/man
+_libdir=${PREFIX}/lib
+_sysconfdir=${PREFIX}/conf
+_includedir=${PREFIX}/include
+contentdir=${PREFIX}/htdocs
+suexec_caller=${PREFIX}/bin/suexec
+_localstatedir=${PREFIX}/logs
+
+if $has_openssl ; then
+ add_conf="--with-ssl=${common_loc} --enable-ssl --with-ssl
--enable-distcache"
+else
+ add_conf="--with-ssl=no"
+ add_conf=""
+fi
+echo "Building prefork and mpm"
+native_sources=srclib/`ls srclib | grep httpd-`
+cd $native_sources
+# Build everything and the kitchen sink with the prefork build
+# removed because of ldap dependencies.
+# --enable-ldap --enable-authnz-ldap \
+mpmbuild prefork \
+ --enable-mods-shared=all \
+ ${add_conf} \
+ --enable-proxy \
+ --enable-cache --enable-mem-cache \
+ --enable-file-cache --enable-disk-cache \
+ --enable-cgid \
+ --enable-authn-anon --enable-authn-alias
+
+# For the other MPMs, just build httpd and no optional modules
+mpmbuild worker --enable-modules=none
+
+# Install it
+RPM_BUILD_ROOT=$output_loc
+pushd prefork
+make DESTDIR=$RPM_BUILD_ROOT install
+popd
+install -m 755 worker/httpd ${RPM_BUILD_ROOT}/${_sbindir}/httpd.worker
Property changes on: trunk/build/unix/buildbin.rhel-httpd.sh
___________________________________________________________________
Name: svn:executable
+ *