Author: mladen.turk(a)jboss.com
Date: 2008-03-06 13:55:05 -0500 (Thu, 06 Mar 2008)
New Revision: 1427
Modified:
trunk/build/unix/build.sh
Log:
Use package.build when generating standalone source distribution. This allows anything as
build version instead depending on fuguring out from directory name
Modified: trunk/build/unix/build.sh
===================================================================
--- trunk/build/unix/build.sh 2008-03-06 18:30:30 UTC (rev 1426)
+++ trunk/build/unix/build.sh 2008-03-06 18:55:05 UTC (rev 1427)
@@ -40,7 +40,13 @@
PACKAGE=""
BUILD_WIN=false
+build_srcp=false
package_list=${build_top}/package.list
+if [ -f ${build_top}/package.build ]; then
+ package_list=${build_top}/package.build
+ build_srcp=true
+fi
+
awk=awk
has_posix_tar=true
@@ -112,17 +118,13 @@
# Check if we just have only to build the binaries
# something like package-version-src or
# package-version-src-ssl (where package is jboss-blalbla).
-if [ -d srclib ]; then
- package_list=${build_top}/package.list
+if $build_srcp; then
has_package=true
has_version=true
- TYPE=`basename ${build_top} | awk -F - '{ print $NF }'`
- if [ $TYPE = "src" ]; then
- build_version=`basename ${build_top} | awk -F - '{ print $(NF-1) }'`
- else
- build_version=`basename ${build_top} | awk -F - '{ print $(NF-2) }'`
- fi
- PACKAGE=`basename ${build_top} | awk -F"-$build_version" '{ print $1
}'`
+
+ PACKAGE=`grep -v '^#' $package_list | head -n1 | awk -F"|"
'{print $2}'`
+ build_version=`grep -v '^#' $package_list | head -n1 | awk -F"|"
'{print $2}'`
+
echo "build_version : $build_version"
echo "PACKAGE : $PACKAGE"
fi
@@ -395,7 +397,7 @@
if $has_openssl; then
package_build_name=${package_build_name}-ssl
fi
-if [ -d srclib ]; then
+if $build_srcp; then
package_src_dir=${build_top}
export package_src_dir
package_dist_dir=${build_top}/dist/${BUILD_TAG}
@@ -929,7 +931,7 @@
}
# Only build binaries?
-if [ -d srclib ]; then
+if $build_srcp; then
buildbin ${build_output_dir}
exit 0
fi
@@ -1056,7 +1058,7 @@
cp util/*.sh ${package_src_dir}/util
# TODO: Generate package list instead copying
-cat > ${package_src_dir}/package.list << EOF
+cat > ${package_src_dir}/package.build << EOF
# THIS FILE WAS AUTOGENERATED BY `basename $0`
#
${PACKAGE}|${build_version}|${svn_tagname}|${apr_version}|${apu_version}|${api_version}|${ssl_version}|${zlib_version}|${jk_version}
Show replies by date