# $Header: /magellan-cvs/smage/include/ggz.sminc,v 1.3 2008/03/31 21:51:32 niro Exp $ # # sminc for ggz-gaming-zone packages # sminclude mbuild # some sane default values : ${PCAT="dev-games"} : ${SRCFILE="${PNAME}-${PVER}.tar.gz"} : ${SRCDIR="${BUILDDIR}/${PNAME}-${PVER}"} : ${DESCRIPTION="The GGZ Gaming Zone - ${PNAME}"} : ${HOMEPAGE="http://www.ggzgamingzone.org/"} # functions to include in the mage file SPECIAL_FUNCTIONS="${SPECIAL_FUNCTIONS} ggz_update_modules ggz_postinstall ggz_postremove" SRC_URI=( ${SRC_URI[*]} http://ftp.belnet.be/packages/ggzgamingzone/ggz/${PVER}/${SRCFILE} http://mirrors.dotsrc.org/ggzgamingzone/ggz/${PVER}/${SRCFILE} http://mirrors.ibiblio.org/pub/mirrors/ggzgamingzone/ggz/${PVER}/${SRCFILE} mirror://${PNAME}/${SRCFILE} ) ggz_configure() { local configure_opts # add commandline given arguments configure_opts="$@" mconfigure \ --disable-dependency-tracking \ --enable-noregistry=/usr/share/ggz/modules \ --disable-debug \ ${configure_opts} \ || die } ggz_src_compile() { cd ${SRCDIR} ggz_configure || die mmake || die } ggz_update_modules() { ggz-config -h &> /dev/null install -d ${MROOT}/etc :> ${MROOT}/etc/ggz.modules if [[ -d ${MROOT}/usr/share/ggz/modules ]] then echo -ne "${COLBLUE} --- ${COLDEFAULT}" echo "updating GGZ modules ..." cd ${MROOT}/usr/share/ggz/modules local dsc find . -type f -name '*.dsc' | while read dsc do DESTDIR=${MROOT} ggz-config -Dim "${dsc}" done fi } ggz_postinstall() { ggz_update_modules } ggz_postremove() { ggz_update_modules } export_inherits ggz src_compile postinstall postremove