# $Header: /magellan-cvs/smage/include/games.sminc,v 1.2 2007/04/24 23:14:05 niro Exp $ # some sane defaults [[ -z ${GAME_EXEC} ]] && GAME_EXEC="${PNAME}" games_configure() { local configure_opts="$@" mconfigure \ --prefix=/usr/games/${PNAME} \ --mandir=/usr/share/man \ --infodir=/usr/share/info \ --datadir=/usr/games/${PNAME}/share \ ${configure_opts} \ || die } games_src_prepare() { munpack ${SRCFILE} || die } games_src_compile() { cd ${SRCDIR} games_configure || die mmake || die } games_src_install() { cd ${SRCDIR} # needed directories install -d ${BINDIR}/usr/bin || die mmake DESTDIR=${BINDIR} install || die # symlink binary to /usr/bin ln -snf ../games/${PNAME}/bin/${GAME_EXEC} ${BINDIR}/usr/bin/${GAME_EXEC} || die # fix permissions chmod 0754 ${BINDIR}/usr/bin/${GAME_EXEC} || die chmod 0754 ${BINDIR}/usr/games/${PNAME}/bin/${GAME_EXEC} || die chown root:games ${BINDIR}/usr/bin/${GAME_EXEC} || die chown -R root:games ${BINDIR}/usr/games/${PNAME} || die local i for i in ABOUT-NLS AUTHORS BUGS CHANGES ChangeLog COPYING \ FAQ LICENSE NEWS README TODO do if [ -f ${SRCDIR}/${i} ] then minstalldocs ${i} || die fi done } export_inherits games src_prepare src_compile src_install