--- trunk/mage/usr/lib/mage/smage2.sh 2011/12/20 16:06:13 1543 +++ trunk/mage/usr/lib/mage/smage2.sh 2011/12/28 10:41:44 1573 @@ -1,50 +1,19 @@ #!/bin/bash +# $Id$ # compiles/installs .smage2 source install scripts # needs pkgbuild_dir (mage) -# SMAGE2 -# $Header: /home/cvsd/magellan-cvs/magellan-src/mage/usr/lib/mage/smage2.sh,v 1.62 2007-11-28 10:47:50 niro Exp $ +# TODO: record dynlib, gz | xz database -#01.10.2004 -# added ccache support -# added distcc support # set default user mage.rc : ${MAGERC="/etc/mage.rc"} ## setup ## -PKGSUFFIX="mpk" -SRCPKGSUFFIX="mpks" SMAGENAME="$1" -SMAGESUFFIX="smage2" -MLIBDIR=/usr/lib/mage SMAGEVERSION="$( < ${MLIBDIR}/version)" -## only for tests -> normally in /etc/rc.d/init.d/functions -COLRED="\033[1;6m\033[31m" -COLGREEN="\033[1;6m\033[32m" -COLYELLOW="\033[1;6m\033[33m" -COLBLUE="\033[1;6m\033[34m" -COLMAGENTA="\033[1;6m\033[35m" -COLWHITE="\033[1;6m\033[37m" -COLGRAY="\033[0;6m\033[37m" -COLBOLD="\033[1m" -COLDEFAULT="\033[0m" - -if [[ ${NOCOLORS} = true ]] -then - COLRED="" - COLGREEN="" - COLYELLOW="" - COLBLUE="" - COLMAGENTA="" - COLWHITE="" - COLGRAY="" - COLBOLD="" - COLDEFAULT="" -fi - # export default C locale export LC_ALL=C @@ -352,7 +321,7 @@ unset SRC_URI } -# dummy function, used if that not exist in smage file +# dummy function, used if that does not exist in smage file src_prepare() { echo "no src_prepare defined" @@ -360,7 +329,7 @@ return 0 } -# dummy function, used if that not exist in smage file +# dummy function, used if that does not exist in smage file src_compile() { echo "no src_compile defined" @@ -368,7 +337,7 @@ return 0 } -# dummy function, used if that not exist in smage file +# dummy function, used if that does not exist in smage file src_install() { echo "no src_install defined" @@ -1498,20 +1467,20 @@ # small sleep to show our settings sleep 1 -# cleans up build if a previously one exists +# clean up builddir if a previously one exist if [ -d ${BUILDDIR} ] then rm -rf ${BUILDDIR}/* || die "couldn't cleanup \$BUILDDIR." fi install -d ${BUILDDIR} || die "couldn't create \$BUILDDIR." -# cleans up srcdir if a previously unpacked one exists +# clean up srcdir if a previously unpacked one exist if [ -d ${SRCDIR} ] then rm -rf ${SRCDIR} fi -# cleans up bindir if a previous build exists or creates a new one +# clean up bindir if a previous build exist or create a new one if [ -d ${BINDIR} ] then rm -rf ${BINDIR} @@ -1530,7 +1499,7 @@ mage rmstamp fi -# setup build loggins +# setup build logging [[ ! -d /var/log/smage ]] && install -d /var/log/smage echo -e "### Build started on $(date) ###\n" > /var/log/smage/${PKGNAME}.log @@ -1630,7 +1599,7 @@ then for target in ${MAGE_TARGETS} do - # check if an special target_pkgbuild exists + # check if a special target_pkgbuild exists if typeset -f ${target}_pkgbuild > /dev/null then # run it