From 2267f07397505f218b1c27d269e5456169d956f1 Mon Sep 17 00:00:00 2001 From: soochoi Date: Mon, 5 Feb 2007 23:43:14 +0000 Subject: [PATCH] CASA-kwallet: add build_script for autobuild --- CASA-kwallet/build_config/linux/autobuild | 61 +++++++++++++++++++++++ 1 file changed, 61 insertions(+) create mode 100755 CASA-kwallet/build_config/linux/autobuild diff --git a/CASA-kwallet/build_config/linux/autobuild b/CASA-kwallet/build_config/linux/autobuild new file mode 100755 index 00000000..d4749823 --- /dev/null +++ b/CASA-kwallet/build_config/linux/autobuild @@ -0,0 +1,61 @@ +#!/bin/bash + +## creating ENV varaibles +SOURCE_DIR=`pwd` +export BUILD_ROOT=$SOURCE_DIR/../autobuild/BUILD +PACKAGE=CASA-kwallet +VERSION=1.7.$1 +TEMP_DIR=$SOURCE_DIR/SOURCES +BUILT_DIR=$BUILD_ROOT/usr/src/packages/BUILD/CASA-kwallet-1.7.$1 +RPMS_DIR=$BUILD_ROOT/usr/src/packages + +##creating tar.gz +rm -rf ../bld_tst +mkdir ../bld_tst +mkdir ../bld_tst/CASA-kwallet-1.7.$1 +cp -R ./* ../bld_tst/CASA-kwallet-1.7.$1 + +echo "pwd" +echo "soo" + +cd ../bld_tst/CASA-kwallet-1.7.$1 +sed -i "s/\(AM_INIT_AUTOMAKE.*\))/\AM_INIT_AUTOMAKE\(CASA-kwallet, 1\.7\.$1\)/" ./configure.in + +find . -name "*.lux" | xargs dos2unix > /dev/null 2>&1 +find . -name "mk*" | xargs dos2unix > /dev/null 2>&1 +find . -name "mk*" | xargs chmod +x > /dev/null 2>&1 +find . -name "Make*" | xargs dos2unix > /dev/null 2>&1 +find . -name "*.c" | xargs dos2unix > /dev/null 2>&1 +find . -name "*.cs" | xargs dos2unix > /dev/null 2>&1 +find . -name "*.cpp" | xargs dos2unix > /dev/null 2>&1 +find . -name "*.h" | xargs dos2unix > /dev/null 2>&1 +find . -name "link*" | xargs dos2unix > /dev/null 2>&1 +find . -name ".svn" | xargs rm -rf > /dev/null 2>&1 +find . -name "*.sh" | xargs dos2unix > /dev/null 2>&1 +find . -name "*.sh" | xargs chmod +x > /dev/null 2>&1 +find . -name "*ver.txt" | xargs dos2unix > /dev/null 2>&1 +find . -name "*build.txt" | xargs dos2unix > /dev/null 2>&1 +find . -name "*.mak" | xargs dos2unix > /dev/null 2>&1 +cd .. +tar cjf ../CASA-kwallet-1.7.$1.tar.bz2 ./CASA-kwallet-1.7.$1 + +#creating spec file +cd $SOURCE_DIR +mkdir --parents $PRODUCTS_DIR $TEMP_DIR +cp ../CASA-kwallet-1.7.$1.tar.bz2 $TEMP_DIR +cp $SOURCE_DIR/package/CASA-kwallet.spec.in $TEMP_DIR/CASA-kwallet.spec +sed -i "s/@VERSION@/1.7.$1/" $TEMP_DIR/CASA-kwallet.spec +sed -i "s/@PACKAGE@/CASA-kwallet/" $TEMP_DIR/CASA-kwallet.spec +cp $SOURCE_DIR/package/CASA-kwallet.changes $TEMP_DIR +cd $TEMP_DIR + +##call autobuild +. /opt/SuSE/bin/.profile +sudo build --clean + +##copy rpms to temp directoy +cp -rf $RPMS_DIR/RPMS $TEMP_DIR +cp -rf $RPMS_DIR/SRPMS $TEMP_DIR +cp -f $TEMP_DIR/*.tar.bz2 $TEMP_DIR +cp -f $TEMP_DIR/*.spec $TEMP_DIR +cp -f $TEMP_DIR/*.changes $TEMP_DIR