# $Header: /alx-cvs/smage/include/alx.sminc,v 1.3 2006/04/03 20:04:47 niro Exp $ # alx functions # to build a stripped down package version # you must call 'package_all_targets' in src_install(). # be sure you have the strip-target-alx() function defined, # get stuff stripped from the package. # # the dev version will be always build when including this file # # The only way to change the bevavior is to set ALX_PKGTYPE # ALX_PKGTYPE=only-alx-dev -> means that *only* the alx-dev package gets build # ALX_PKGTYPE=only-alx -> means that *only* the stripped alx package gets build # # all targets for alx MAGE_TARGETS="alx_dev alx_livecd alx" # overrides [[ ${ALX_PKGTYPE} = only-alx-dev ]] && MAGE_TARGETS="alx_dev" [[ ${ALX_PKGTYPE} = only-alx-livecd ]] && MAGE_TARGETS="alx_livecd" [[ ${ALX_PKGTYPE} = only-alx ]] && MAGE_TARGETS="alx" # dummy functions, should be overrided in smage alx_dev_pkgbuild() { return 0; } alx_livecd_pkgbuild() { return 0; } alx_pkgbuild() { return 0; } # checks if compilation should be against alx target_alx_dev() { local i if [ -n "${MAGE_TARGETS}" ] then for i in ${MAGE_TARGETS} do [[ ${i} = alx_dev ]] && return 0 # alx-dev will always build when building target alx, # so target alx ist also allowed to be alx-dev [[ ${i} = alx ]] && return 0 # same for alx_livecd [[ ${i} = alx_livecd ]] && return 0 done fi # nothing match, we are *not* on alx linux return 1 } # check if compilation should be against stripped down alx for livecds target_alx_livecd() { if [ -n "${MAGE_TARGETS}" ] then for i in ${MAGE_TARGETS} do [[ ${i} = alx_livecd ]] && return 0 done fi # nothing match, we are *not* on alx linux return 1 } # check if compilation should be against stripped down alx target_alx() { if [ -n "${MAGE_TARGETS}" ] then for i in ${MAGE_TARGETS} do [[ ${i} = alx ]] && return 0 done fi # nothing match, we are *not* on alx linux return 1 }