# $Header: /magellan-cvs/smage/wesnoth/wesnoth-1.2.7-r2.smage2,v 1.2 2008/02/07 14:23:55 niro Exp $ PNAME="wesnoth" PVER="1.2.7" PBUILD="r2" PCATEGORIE="x11-games" STATE="testing" DESCRIPTION="The Battle for Wesnoth is a turn-based strategy game with a fantasy theme." HOMEPAGE="http://www.wesnoth.org/" DEPEND=">= x11-libs/libX11-1 >= media-libs/libsdl-1.2 >= media-libs/sdl-mixer-1.2 >= media-libs/sdl-image-1.2 >= media-libs/sdl-net-1.2.5 >= media-libs/freetype-2.1.9 >= sys-libs/zlib-1.2.1 >= dev-libs/zipios++-0.1.5.9" SDEPEND=">= sys-dev/gettext-0.12.1 >= dev-util/intltool-0.33 >= app-arch/zip-2.3" SRCFILE="${PNAME}-${PVER}.tar.bz2" SRCDIR="${BUILDDIR}/${PNAME}-${PVER}" sminclude mbuild mtools SRC_URI=( sourceforge://${PNAME}/${SRCFILE} mirror://${PNAME}/${SRCFILE} ) src_compile() { cd ${SRCDIR} mconfigure \ --prefix=/usr/games/${PNAME} \ --mandir=/usr/share/man \ --infodir=/usr/share/info \ --datadir=/usr/games/${PNAME}/share \ --disable-dependency-tracking \ --enable-nls \ --disable-debug \ --disable-lite \ --disable-tinygui \ --enable-game \ --enable-server \ --enable-campaign-server \ --enable-editor \ --enable-tools \ --enable-gnome \ --enable-kde \ --disable-dummy-locales \ || die mmake || die } src_install() { cd ${SRCDIR} # needed directories minstalldir /usr/bin || die minstalldir /usr/share/applications || die make DESTDIR=${BINDIR} install || die # compress all share-data with zip (utility included in the sources) ${SRCDIR}/utils/splittree ${BINDIR}/usr/games/${PNAME}/share/${PNAME} --zip || die # symlink binaries to /usr/bin mlink ../games/${PNAME}/bin/${PNAME} /usr/bin/${PNAME} || die mlink ../games/${PNAME}/bin/${PNAME}d /usr/bin/${PNAME}d || die mlink ../games/${PNAME}/bin/${PNAME}_editor /usr/bin/${PNAME}_editor || die # install destop icon minstallfile icons/wesnoth.desktop /usr/share/applications || die minstallpixmap images/wesnoth-icon.png || die # docs minstalldocs ABOUT-NLS COPYING INSTALL MANUAL* README || die # fix permissions mchown root:games /usr/bin/${PNAME} || die mchown -R root:games /usr/games/${PNAME} || die mchown -R root:games /var/lib/run/${PNAME}d || die mchmod 0754 /usr/bin/${PNAME} || die mchmod 0754 /usr/games/${PNAME}/bin/${PNAME} || die }