Author: jfrederic.clere(a)jboss.com
Date: 2007-12-10 05:25:14 -0500 (Mon, 10 Dec 2007)
New Revision: 1165
Added:
trunk/build/unix/buildbin.jboss-httpd.windows.sh
trunk/build/unix/buildsrc.jboss-httpd.sh
trunk/build/unix/util/
trunk/build/unix/util/ckeckdownload.sh
Modified:
trunk/build/unix/build.sh
trunk/build/unix/package.list
Log:
Add very first logic for httpd.
Modified: trunk/build/unix/build.sh
===================================================================
--- trunk/build/unix/build.sh 2007-12-06 18:17:16 UTC (rev 1164)
+++ trunk/build/unix/build.sh 2007-12-10 10:25:14 UTC (rev 1165)
@@ -31,6 +31,7 @@
# Globals
build_top=`pwd`
+export build_top
NATIVEEOL=LF
build_version=""
PACKAGE=""
@@ -42,6 +43,8 @@
# parameters
has_openssl=false
+has_apr=true
+has_apu=true
has_cache=false
has_version=false
has_package=false
@@ -139,6 +142,12 @@
if [ "x" = "x${ssl_version}" ]; then
has_openssl=false
fi
+if [ "x" = "x${apr_version}" ]; then
+ has_apr=false
+fi
+if [ "x" = "x${apu_version}" ]; then
+ has_apu=false
+fi
# Get plaform information
so_extension=so
@@ -218,6 +227,7 @@
fi
build_cache_dir=${build_top}/cache
+export build_cache_dir
build_working_dir=${build_top}/work
build_output_dir=${build_top}/output
@@ -242,6 +252,7 @@
package_build_name=${package_build_name}-ssl
fi
package_src_dir=${build_working_dir}/${package_src_name}
+export package_src_dir
package_dist_dir=${build_working_dir}/${package_src_name}/dist/${BUILD_TAG}
package_output_dir=${build_working_dir}/${package_src_name}/output/${BUILD_TAG}
@@ -540,14 +551,18 @@
echo "Building binaries at `pwd`"
dst_dir=$1
- buildapr srclib/apr-${apr_version} false
- if $has_static ; then
- buildapr srclib/apr-${apr_version} true
+ if $has_apr; then
+ buildapr srclib/apr-${apr_version} false
+ if $has_static ; then
+ buildapr srclib/apr-${apr_version} true
+ fi
+ if $has_apu; then
+ buildapu srclib/apr-util-${apu_version} false
+ if $has_static ; then
+ buildapu srclib/apr-util-${apu_version} true
+ fi
+ fi
fi
- buildapu srclib/apr-util-${apu_version} false
- if $has_static ; then
- buildapu srclib/apr-util-${apu_version} true
- fi
ls srclib | grep openssl >/dev/null
if [ $? -eq 0 ]; then
@@ -620,11 +635,15 @@
rm -rf ${package_src_dir}
mkdir -p ${package_src_dir}/srclib
-ckeckdownload apr-${apr_version} $APRURL $APRURLBACK
-ckeckdownload apr-util-${apu_version} $APUURL $APUURLBACK
if $has_openssl; then
ckeckdownload openssl-${ssl_version} $SSLURL ""
fi
+if $has_apr; then
+ ckeckdownload apr-${apr_version} $APRURL $APRURLBACK
+fi
+if $has_apu; then
+ ckeckdownload apr-util-${apu_version} $APUURL $APUURLBACK
+fi
#
# Get the repository of what we build.
@@ -646,8 +665,12 @@
# Copy other files
cp ../NMAKEcommon.inc $package_src_dir
cp ../../JBossORG-EULA.txt $package_src_dir
-cp ../../srclib/apr/NMAKEmakefile $package_src_dir/srclib/apr-${apr_version}/
-cp ../../srclib/apr-util/NMAKEmakefile $package_src_dir/srclib/apr-util-${apu_version}/
+if $has_apr; then
+ cp ../../srclib/apr/NMAKEmakefile $package_src_dir/srclib/apr-${apr_version}/
+fi
+if $has_apu; then
+ cp ../../srclib/apr-util/NMAKEmakefile
$package_src_dir/srclib/apr-util-${apu_version}/
+fi
# Build the source tarball
buildtar ${build_working_dir} ${package_src_name} ${build_output_dir}
${package_src_name}
Added: trunk/build/unix/buildbin.jboss-httpd.windows.sh
===================================================================
--- trunk/build/unix/buildbin.jboss-httpd.windows.sh (rev 0)
+++ trunk/build/unix/buildbin.jboss-httpd.windows.sh 2007-12-10 10:25:14 UTC (rev 1165)
@@ -0,0 +1,58 @@
+#!/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
+#
+echo ""
+echo "Running : `basename $0` $LastChangedDate: 2007-05-31 19:40:31 +0200 (Thu, 31
May 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
+
+win_common_loc=`cygpath -w -a ${common_loc}`
+win_prefix_loc=`cygpath -w -a ${prefix_loc}`
+
+echo "Configuring Httpd"
+platform_path="HTTPD-BIN/${BUILD_SYS}/${BUILD_CPU}"
+mkdir -p ${output_loc}/${platform_path}
+
+src_dir=`cygpath -w -a srclib/httpd`
+
+(cd srclib/httpd*
+ echo "Building Httpd in `pwd`"
+ nmake -f Makefile.win INSTDIR="c:\Program Files\Httpd" installr
+)
Property changes on: trunk/build/unix/buildbin.jboss-httpd.windows.sh
___________________________________________________________________
Name: svn:executable
+ *
Added: trunk/build/unix/buildsrc.jboss-httpd.sh
===================================================================
--- trunk/build/unix/buildsrc.jboss-httpd.sh (rev 0)
+++ trunk/build/unix/buildsrc.jboss-httpd.sh 2007-12-10 10:25:14 UTC (rev 1165)
@@ -0,0 +1,52 @@
+#!/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
+#
+echo ""
+echo "Running : `basename $0` $LastChangedDate: 2007-06-01 18:00:27 +0200 (Fri, 01
Jun 2007) $"
+echo ""
+echo "Started : `date`"
+echo "Tag : $1"
+echo "Target : $2"
+echo ""
+
+# parameters
+# $1: The tag to use something like 2.2.6 or trunk
+# $2: Directory where to put the sources.
+
+native_tag=$1
+native_dist=$2
+
+if [ $native_tag = "trunk" ]; then
+
native_svn=http://svn.apache.org/repos/asf/httpd/httpd/trunk
+ native_tag_opt="-r HEAD"
+ native_ext=current
+ svn export --native-eol=${NATIVEEOL} ${native_tag_opt} ${native_svn}
${native_dist}/srclib/httpd-${native_ext}
+else
+ # here we use a released tarball
+ if $BUILD_WIN ; then
+
URL=http://archive.apache.org/dist/httpd/httpd-${native_tag}-win32-src.zip
+ else
+
URL=http://archive.apache.org/dist/httpd/httpd-${native_tag}.tar.gz
+ fi
+ util/ckeckdownload.sh $build_cache_dir $package_src_dir $build_top httpd-${native_tag}
$URL NONE
+fi
Property changes on: trunk/build/unix/buildsrc.jboss-httpd.sh
___________________________________________________________________
Name: svn:executable
+ *
Modified: trunk/build/unix/package.list
===================================================================
--- trunk/build/unix/package.list 2007-12-06 18:17:16 UTC (rev 1164)
+++ trunk/build/unix/package.list 2007-12-10 10:25:14 UTC (rev 1165)
@@ -8,3 +8,5 @@
jboss-sight|1.0.0|1.2.9|1.2.8||trunk
jboss-sight|1.0.1|1.2.8|1.2.8||trunk
jboss-sight|1.0.2|1.2.8|1.2.8||trunk
+# httpd
+jboss-httpd|0.0.1||||2.2.6
Added: trunk/build/unix/util/ckeckdownload.sh
===================================================================
--- trunk/build/unix/util/ckeckdownload.sh (rev 0)
+++ trunk/build/unix/util/ckeckdownload.sh 2007-12-10 10:25:14 UTC (rev 1165)
@@ -0,0 +1,99 @@
+#!/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
+#
+
+# Download the sources. It guess how to do it.
+# $1: URL.
+# $1: Back URL. (archive for apache)
+downloadtaredsrc()
+{
+ URL=$1
+ URLBACK=$2
+ if [ -z $URLBACK ]; then
+ URLBACK=$URL
+ fi
+ wget --tries=0 --retry-connrefused $URL
+ if [ $? -ne 0 ]; then
+ echo "downloadtaredsrc Retrying on $URLBACK"
+ wget --tries=0 --retry-connrefused $URLBACK
+ fi
+ fname=`basename $URL`
+ case ${fname} in
+ *.tar.gz)
+ gunzip -c $fname | tar -xf -
+ ;;
+ *.zip)
+ unzip -q -o $fname
+ ;;
+ esac
+ rm -f $fname
+}
+
+# Apply patch for the component
+# $1 directory of the component like apr-1.2.8
+applypatch()
+{
+ DIR=$1
+ if [ -f $build_top/../patch/$DIR.patch ];
+ then
+ (cd $DIR
+ patch -tfs -p0 -i $build_top/../patch/$DIR.patch
+ )
+ fi
+}
+
+# Check and download
+# $1 directory of the checkout directory
+# $2 url for the download
+# $3 backup url for the download
+ckeckdownload()
+{
+ src_dir=$1
+ src_url=$2
+ src_url_back=$3
+ cd $build_cache_dir
+ if [ ! -d ${src_dir} ]; then
+ downloadtaredsrc $src_url $src_url_back
+ applypatch $src_dir
+ fi
+ cp -rp ${src_dir} ${package_src_dir}/srclib
+ cd $build_top
+}
+
+# ckeckdownload sub shell version.
+# Check and download
+# $1 cache directory.
+# $2 directory where the sources are located.
+# $3 build_top. Where we start the build.sh
+# $4 directory of the checkout directory
+# $5 url for the download
+# $6 backup url for the download
+build_cache_dir=$1
+package_src_dir=$2
+build_top=$3
+src_dir=$4
+url=$5
+urlback=$6
+
+# Call the internal functions.
+ckeckdownload $src_dir $url $url_back
Property changes on: trunk/build/unix/util/ckeckdownload.sh
___________________________________________________________________
Name: svn:executable
+ *