Author: mladen.turk(a)jboss.com
Date: 2007-12-13 02:47:12 -0500 (Thu, 13 Dec 2007)
New Revision: 1193
Modified:
trunk/build/unix/build.sh
trunk/build/unix/package.list
Log:
Add zlib to the build.sh
Modified: trunk/build/unix/build.sh
===================================================================
--- trunk/build/unix/build.sh 2007-12-13 07:33:59 UTC (rev 1192)
+++ trunk/build/unix/build.sh 2007-12-13 07:47:12 UTC (rev 1193)
@@ -42,11 +42,13 @@
has_posix_tar=true
# parameters
+has_zlib=false
has_openssl=false
has_apr=true
has_apu=true
has_api=true
build_api=false
+build_zlib=false
has_cache=false
has_version=false
has_package=false
@@ -148,8 +150,12 @@
apu_version=`echo "${parg}" | ${awk} -F'|' '{print $4}'`
api_version=`echo "${parg}" | ${awk} -F'|' '{print $5}'`
ssl_version=`echo "${parg}" | ${awk} -F'|' '{print $6}'`
-svn_tagname=`echo "${parg}" | ${awk} -F'|' '{print $7}'`
+zlib_version=`echo "${parg}" | ${awk} -F'|' '{print $7}'`
+svn_tagname=`echo "${parg}" | ${awk} -F'|' '{print $8}'`
+if [ "x" = "x${zlib_version}" ]; then
+ has_zlib=false
+fi
if [ "x" = "x${ssl_version}" ]; then
has_openssl=false
fi
@@ -220,6 +226,9 @@
if $has_api; then
build_api=true
fi
+ if $has_zlib; then
+ build_zlib=true
+ fi
;;
CYGWIN*)
so_extension=dll
@@ -602,6 +611,39 @@
}
#
+# Build zlib
+# $1 directory of the sources directory
+# $2 static or shared
+buildzlib()
+{
+ zlib_srcdir=$1
+ zlib_static=$2
+
+ if $zlib_static ; then
+ zlib_common_dir=${build_common_dir}-static
+ else
+ zlib_common_dir=${build_common_dir}
+ fi
+
+ if [ -f ${zlib_common_dir}/include/apr-1/zlib.h ]; then
+ echo "Using cached zlib in ${zlib_common_dir}"
+ return
+ fi
+ echo "Configuring zlib-${zlib_version} with --prefix=${zlib_common_dir}"
+ if $BUILD_WIN ; then
+ (cd ${zlib_srcdir}
+ echo "Building Zlib ${zlib_version} ..."
+ cygwinpath true PREFIX=${zlib_common_dir} SRCDIR=`pwd`
+ if $zlib_static ; then
+ nmake -f NMAKEmakefile $wrapped_args ZLIB_DECLARE_STATIC=true install
+ else
+ nmake -f NMAKEmakefile $wrapped_args install
+ fi
+ )
+ fi
+}
+
+#
# Build the binaries
# $1 directory where to put the resulting tarball.
# XXX: It is always $build_output_dir !
@@ -702,10 +744,14 @@
APIURLBACK=http://archive.apache.org/dist/apr/apr-iconv-${api_version}.ta...
fi
SSLURL=http://www.openssl.org/source/openssl-${ssl_version}.tar.gz
+ZLIBURL=http://www.zlib.net/zlib-${zlib_version}.tar.gz
rm -rf ${package_src_dir}
mkdir -p ${package_src_dir}/srclib
+if $has_zlib; then
+ ckeckdownload zlib-${zlib_version} $ZLIBURL ""
+fi
if $has_openssl; then
ckeckdownload openssl-${ssl_version} $SSLURL ""
fi
@@ -732,7 +778,7 @@
cat > ${package_src_dir}/package.list << EOF
# THIS FILE WAS AUTOGENERATED BY `basename $0`
#
-${PACKAGE}|${build_version}|${apr_version}|${apu_version}|${api_version}|${ssl_version}|${svn_tagname}
+${PACKAGE}|${build_version}|${apr_version}|${apu_version}|${api_version}|${ssl_version}|${zlib_version}|${svn_tagname}
EOF
Modified: trunk/build/unix/package.list
===================================================================
--- trunk/build/unix/package.list 2007-12-13 07:33:59 UTC (rev 1192)
+++ trunk/build/unix/package.list 2007-12-13 07:47:12 UTC (rev 1193)
@@ -1,13 +1,13 @@
# list of the packages
# add new versions of package after existing ones.
-jboss-native|2.0.1|1.2.9|1.2.8|1.2.1|0.9.8e|TOMCAT_NATIVE_1_1_11
-jboss-native|2.0.2|1.2.9|1.2.8|1.2.1|0.9.8e|TOMCAT_NATIVE_1_1_11
-jboss-native|2.0.3-dev|1.2.8|1.2.8|1.2.1|0.9.8e|trunk
-jboss-native|2.0.3|1.2.8|1.2.8|1.2.1|0.9.8e|TOMCAT_NATIVE_1_1_11
+jboss-native|2.0.1|1.2.9|1.2.8|1.2.1|0.9.8e|1.2.3|TOMCAT_NATIVE_1_1_11
+jboss-native|2.0.2|1.2.9|1.2.8|1.2.1|0.9.8e|1.2.3|TOMCAT_NATIVE_1_1_11
+jboss-native|2.0.3-dev|1.2.8|1.2.8|1.2.1|0.9.8e|1.2.3|trunk
+jboss-native|2.0.3|1.2.8|1.2.8|1.2.1|0.9.8e|1.2.3|TOMCAT_NATIVE_1_1_11
# SIGHT
-jboss-sight|1.0.0|1.2.9|1.2.8|1.2.1||trunk
-jboss-sight|1.0.1|1.2.8|1.2.8|1.2.1||trunk
-jboss-sight|1.0.2|1.2.8|1.2.8|1.2.1||trunk
+jboss-sight|1.0.0|1.2.9|1.2.8|1.2.1|||trunk
+jboss-sight|1.0.1|1.2.8|1.2.8|1.2.1|||trunk
+jboss-sight|1.0.2|1.2.8|1.2.8|1.2.1|||trunk
# httpd
-jboss-httpd|0.0.1|||||2.2.6
-rhel-httpd|0.0.1|||||httpd-2_2_3-11_el5
+jboss-httpd|0.0.1||||||2.2.6
+rhel-httpd|0.0.1||||||httpd-2_2_3-11_el5