Author: jfrederic.clere(a)jboss.com
Date: 2009-08-07 11:02:27 -0400 (Fri, 07 Aug 2009)
New Revision: 2533
Modified:
trunk/build/unix/build.sh
Log:
Make the NMAKEmakefile copy generic.
Modified: trunk/build/unix/build.sh
===================================================================
--- trunk/build/unix/build.sh 2009-08-07 13:55:41 UTC (rev 2532)
+++ trunk/build/unix/build.sh 2009-08-07 15:02:27 UTC (rev 2533)
@@ -1052,17 +1052,24 @@
}
# Check and download
-# $1 directory of the checkout directory
-# $2 url for the download
-# $3 backup url for the download
-ckeckdownload()
+# $1 compoment to checkout
+# $2 version of the componemt
+# $3 url for the download
+# $4 backup url for the download
+checkdownload()
{
- src_dir=$1
- src_url=$2
- src_url_back=$3
+ name_prod=$1
+ version_prod=$2
+ src_dir=$1-$2
+ src_url=$3
+ src_url_back=$4
cd $build_cache_dir
if [ ! -d ${src_dir} ]; then
downloadtaredsrc $src_url $src_url_back
+ if [ -f $build_top/../../srclib/${name_prod}/NMAKEmakefile ]; then
+ echo "copying $build_top/../../srclib/${name_prod}/NMAKEmakefile to
$package_src_dir/srclib/${name_prod}-${version_prod}/"
+ cp $build_top/../../srclib/${name_prod}/NMAKEmakefile
$package_src_dir/srclib/${name_prod}-${version_prod}/
+ fi
applypatch $src_dir false
fi
cp -rp ${src_dir} ${package_src_dir}/srclib
@@ -1098,12 +1105,12 @@
mkdir -p ${package_src_dir}/srclib
if $has_zlib; then
- ckeckdownload zlib-${zlib_version} $ZLIBURL "NONE"
+ checkdownload zlib ${zlib_version} $ZLIBURL "NONE"
fi
# Note: type of the download (r: rhel, v: internet, t: tag in svn).
if $has_openssl; then
if [ "${ssl_type}" = "v" ]; then
- ckeckdownload openssl-${ssl_version} $SSLURL "NONE"
+ checkdownload openssl ${ssl_version} $SSLURL "NONE"
elif [ "${ssl_type}" = "r" ]; then
if [ "x${ssl_version}" = "x" ]; then
tag=trunk
@@ -1119,19 +1126,19 @@
fi
fi
if $has_apr; then
- ckeckdownload apr-${apr_version} $APRURL $APRURLBACK
+ checkdownload apr ${apr_version} $APRURL $APRURLBACK
fi
if $has_apu; then
- ckeckdownload apr-util-${apu_version} $APUURL $APUURLBACK
+ checkdownload apr-util ${apu_version} $APUURL $APUURLBACK
fi
if $has_api; then
- ckeckdownload apr-iconv-${api_version} $APIURL $APIURLBACK
+ checkdownload apr-iconv ${api_version} $APIURL $APIURLBACK
fi
if $has_iconv; then
- ckeckdownload libiconv-${iconv_version} $ICONVURL "NONE"
+ checkdownload libiconv ${iconv_version} $ICONVURL "NONE"
fi
if $has_expat; then
- ckeckdownload expat-${expat_version} $EXPATURL "NONE"
+ checkdownload expat ${expat_version} $EXPATURL "NONE"
fi
#
@@ -1139,19 +1146,6 @@
cp ../NMAKEcommon.inc $package_src_dir
svn export --force ../../licenses $package_src_dir/licenses
-if $has_apr; then
- cp ../../srclib/apr/NMAKEmakefile $package_src_dir/srclib/apr-${apr_version}/
-fi
-if $has_api; then
- cp ../../srclib/apr-iconv/NMAKEmakefile
$package_src_dir/srclib/apr-iconv-${api_version}/
-fi
-if $has_apu; then
- cp ../../srclib/apr-util/NMAKEmakefile
$package_src_dir/srclib/apr-util-${apu_version}/
-fi
-if $has_zlib; then
- cp ../../srclib/zlib/NMAKEmakefile $package_src_dir/srclib/zlib-${zlib_version}/
-fi
-
#
# Get the repository of what we build.
override ${build_top}/buildsrc.${PACKAGE}.sh ${svn_tagname} ${package_src_dir}