Author: jfrederic.clere(a)jboss.com
Date: 2008-01-23 05:08:50 -0500 (Wed, 23 Jan 2008)
New Revision: 1297
Added:
trunk/build/unix/util/override.sh
Modified:
trunk/build/unix/build.sh
trunk/build/unix/buildbin.asf-jk.sh
trunk/build/unix/buildbin.rhel-httpd.sh
trunk/build/unix/buildsrc.rhel-httpd.sh
Log:
Remove the mod_jk logic from build.sh and move it in buildbin.rhel-httpd and
buildsrc.rhel-httpd.
Modified: trunk/build/unix/build.sh
===================================================================
--- trunk/build/unix/build.sh 2008-01-22 13:36:55 UTC (rev 1296)
+++ trunk/build/unix/build.sh 2008-01-23 10:08:50 UTC (rev 1297)
@@ -198,6 +198,8 @@
fi
if [ "x" = "x${jk_version}" ]; then
has_jk=false
+else
+ export jk_version
fi
if [ "x" = "x${iconv_version}" ]; then
has_iconv=false
@@ -315,6 +317,7 @@
echo "using expat: ${expat_version}"
fi
+export has_jk
export so_extension
export NATIVEEOL
export BUILD_SYS
@@ -825,7 +828,7 @@
fi
# Do our specific part.
- override ${package_src_dir}/buildbin.${PACKAGE}.sh ${build_common_dir}
${package_dist_dir} ${package_output_dir} $has_openssl $has_static
+ override ${package_src_dir}/buildbin.${PACKAGE}.sh ${build_common_dir}
${package_dist_dir} ${package_output_dir} $has_openssl $has_static ${package_src_dir}
if [ $? -ne 0 ]; then
echo "${package_src_dir}/buildbin.${PACKAGE}.sh failed"
return 1
@@ -834,15 +837,6 @@
# General part
cp JBossORG-EULA.txt ${package_output_dir}
- # mod_jk
- if $has_jk; then
- override ${package_src_dir}/buildbin.asf-jk.sh ${build_common_dir}
${package_dist_dir} ${package_output_dir} $has_openssl $has_static
- if [ $? -ne 0 ]; then
- echo "${package_src_dir}/buildbin.asf-jk.sh failed"
- return 1
- fi
- fi
-
# Build the binary distribution tarball
buildtar ${package_output_dir} "*" ${dst_dir} ${package_build_name}
if [ $? -ne 0 ]; then
@@ -939,13 +933,6 @@
override ${build_top}/buildsrc.${PACKAGE}.sh ${svn_tagname} ${package_src_dir}
#
-# Add mod_jk if needed.
-if $has_jk; then
- override ${build_top}/buildsrc.asf-jk.sh ${jk_version} ${package_src_dir}
- cp ./buildbin.asf-jk*.sh ${package_src_dir}
-fi
-
-#
# Copy build files
cp ./build.sh ${package_src_dir}
cp ./buildbin.${PACKAGE}*.sh ${package_src_dir}
Modified: trunk/build/unix/buildbin.asf-jk.sh
===================================================================
--- trunk/build/unix/buildbin.asf-jk.sh 2008-01-22 13:36:55 UTC (rev 1296)
+++ trunk/build/unix/buildbin.asf-jk.sh 2008-01-23 10:08:50 UTC (rev 1297)
@@ -37,11 +37,13 @@
# $2: Destination location.
# $3: Location where to put the binaries.
# $4: Use OpenSSL.
+# $5: Location of the sources.
common_loc=$1
prefix_loc=$2
output_loc=$3
has_openssl=$4
+sources_loc=$5
current_loc=`pwd`
echo "Building mod_jk in $current_loc"
@@ -49,8 +51,12 @@
cd $native_sources
apxs=`find $output_loc -name apxs`
-config=`find $output_loc -name config_vars.mk`
+config=`find $output_loc -name config_vars.mk | grep -v jk/config_vars.mk`
configdir=`dirname $config`
+
+echo "Using: $apxs"
+echo "Using: $config"
+
#
# Arrange apxs/config_vars.mk so that we can use it with the httpd we are building.
echo "/^my \$installbuilddir = / c\\" > $$.sed
@@ -68,7 +74,7 @@
APR_INCLUDEDIR=`dirname $APR_INCLUDE`
APU_INCLUDE=`find $output_loc -type f -name apu.h`
APU_INCLUDEDIR=`dirname $APU_INCLUDE`
-exp_installbuild=`find $output_loc -type f -name config_vars.mk`
+exp_installbuild=`find $output_loc -type f -name config_vars.mk | grep -v
jk/config_vars.mk`
exp_installbuilddir=`dirname $exp_installbuild`
modules_dir=`find $output_loc -type d -name modules`
Modified: trunk/build/unix/buildbin.rhel-httpd.sh
===================================================================
--- trunk/build/unix/buildbin.rhel-httpd.sh 2008-01-22 13:36:55 UTC (rev 1296)
+++ trunk/build/unix/buildbin.rhel-httpd.sh 2008-01-23 10:08:50 UTC (rev 1297)
@@ -30,6 +30,8 @@
echo "Prefix : $2"
echo "Output : $3"
echo "OpenSSL : $4"
+echo "Static : $5"
+echo "Sources : $6"
echo ""
@@ -38,11 +40,15 @@
# $2: Destination location.
# $3: Location where to put the binaries.
# $4: Use OpenSSL.
+# $5: Use static build.
+# $6: Location of the sources.
common_loc=$1
prefix_loc=$2
output_loc=$3
-has_openssl=$4
+has_openssl_loc=$4
+has_static_loc=$5
+sources_loc=$6
current_loc=`pwd`
#
@@ -96,7 +102,7 @@
suexec_caller=${PREFIX}/bin/suexec
_localstatedir=${PREFIX}/logs
-if $has_openssl ; then
+if $has_openssl_loc ; then
add_conf="--with-ssl=${common_loc} --enable-ssl --with-ssl
--enable-distcache"
else
add_conf="--with-ssl=no"
@@ -163,5 +169,15 @@
# Install it
#install -m 755 worker/httpd ${RPM_BUILD_ROOT}/${_sbindir}/httpd.worker
install -m 755 httpd ${RPM_BUILD_ROOT}/${_sbindir}/httpd.worker
+
+# Process mod_jk if needed.
+if $has_jk; then
+ cd ${current_loc}
+ ${build_top}/util/override.sh ${sources_loc}/buildbin.asf-jk.sh ${common_loc}
${prefix_loc} ${output_loc} $has_openssl_loc $has_static_loc ${sources_loc}
+ if [ $? -ne 0 ]; then
+ echo "${sources_loc}/buildbin.asf-jk.sh failed"
+ exit 1
+ fi
+fi
echo "Done"
exit 0
Modified: trunk/build/unix/buildsrc.rhel-httpd.sh
===================================================================
--- trunk/build/unix/buildsrc.rhel-httpd.sh 2008-01-22 13:36:55 UTC (rev 1296)
+++ trunk/build/unix/buildsrc.rhel-httpd.sh 2008-01-23 10:08:50 UTC (rev 1297)
@@ -128,3 +128,12 @@
#(cd ${dirsources}
# autoheader && autoconf || exit 1
#)
+
+if $has_jk; then
+ ${build_top}/util/override.sh ${build_top}/buildsrc.asf-jk.sh ${jk_version}
${package_src_dir}
+ if [ $? -ne 0 ]; then
+ echo "buildsrc.asf-jk.sh failed"
+ exit 1
+ fi
+ cp ${build_top}/buildbin.asf-jk*.sh ${package_src_dir}
+fi
Added: trunk/build/unix/util/override.sh
===================================================================
--- trunk/build/unix/util/override.sh (rev 0)
+++ trunk/build/unix/util/override.sh 2008-01-23 10:08:50 UTC (rev 1297)
@@ -0,0 +1,46 @@
+#!/bin/sh
+# Copyright(c) 2008 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
+
+# Override a command using the environment.
+# $1 script $2..n (parameters).
+
+basedir=`dirname $1`
+cmd=`basename $1 .sh`
+if [ -x ${basedir}/${cmd}.${BUILD_SYS}.${BUILD_CPU}.sh ]; then
+ run=${cmd}.${BUILD_SYS}.${BUILD_CPU}.sh
+elif [ -x ${basedir}/${cmd}.${BUILD_SYS}.sh ]; then
+ run=${cmd}.${BUILD_SYS}.sh
+else
+ run=${cmd}.sh
+fi
+shift
+echo "Running ${basedir}/$run $@"
+${basedir}/$run $@
+ret=$?
+if [ ${ret} -eq 2 ]; then
+ echo "$run not supported on this platform"
+ exit 0
+elif [ ${ret} -ne 0 ]; then
+ echo "$run returned ${ret}"
+ exit 1
+fi
Property changes on: trunk/build/unix/util/override.sh
___________________________________________________________________
Name: svn:executable
+ *
Show replies by thread