# $Id$ sminclude mtools # 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 minstalldir /usr/bin || die mmake DESTDIR=${BINDIR} install || die # symlink binary to /usr/bin mlink ../games/${PNAME}/bin/${GAME_EXEC} /usr/bin/${GAME_EXEC} || die # fix permissions mchown root:games /usr/bin/${GAME_EXEC} || die mchown -R root:games /usr/games/${PNAME} || die mchmod 0754 /usr/bin/${GAME_EXEC} || die mchmod 0754 /usr/games/${PNAME}/bin/${GAME_EXEC} || 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