# $Header: /magellan-cvs/smage/nwn/nwn-1.68-r3.smage2,v 1.3 2008/02/07 14:23:51 niro Exp $ PNAME="nwn" PVER="1.68" PBUILD="r3" PCATEGORIE="x11-games" STATE="testing" DESCRIPTION="Neverwinter Nights (NWN) is a computer game set in a huge medieval fantasy world of Dungeons and Dragons." HOMEPAGE="http://nwn.bioware.com/index.html" DEPEND=">= sys-libs/libstdc++-v3-3.3 >= virtual/opengl >= x11-libs/libXext-1 >= x11-libs/libX11-1 >= media-libs/libsdl-1.2.9 >= x11-games/nwn-resources-1.29" SDEPEND=">= dev-util/desktop-file-utils-0.10" SRCFILE="English_linuxclient${PVER/.}_orig.tar.gz" SRCDIR="${BUILDDIR}/${PNAME}-${PVER}" NOSTRIP=true sminclude mtools xdg SRC_URI=( http://files.bioware.com/neverwinternights/updates/linux/${PVER/.}/${SRCFILE} mirror://${PNAME}/nwn-wrapper.sh mirror://${PNAME}/nwn-dmc-wrapper.sh mirror://${PNAME}/nwn.png mirror://${PNAME}/nwn.desktop mirror://${PNAME}/nwn-dmc.png mirror://${PNAME}/nwn-dmc.desktop ) src_prepare() { install -d ${SRCDIR} || die munpack ${SRCFILE} ${SRCDIR} || die } src_install() { cd ${SRCDIR} # needed directories minstalldir /usr/bin || die minstalldir /usr/games/nwn || die minstalldir /usr/share/pixmaps || die mv ${SRCDIR}/* ${BINDIR}/usr/games/nwn || die # fix permissions mchown -R root:games /usr/games/nwn || die local i for i in nwmain nwserver patch.key data/patch.bif do mchmod 0754 /usr/games/nwn/${i} || die done # dialog.tk is not readable by game group mchmod g+rwX /usr/games/nwn/dialog.tlk || die # install some wrappers working with our distribution minstallexec -s nwn-wrapper.sh /usr/games/nwn/nwn || die minstallexec -s nwn-dmc-wrapper.sh /usr/games/nwn/nwn-dmclient || die mchown root:games /usr/games/nwn/nwn || die mchown root:games /usr/games/nwn/nwn-dmclient || die mchmod 0754 /usr/games/nwn/nwn || die mchmod 0754 /usr/games/nwn/nwn-dmclient || die mlink /usr/games/nwn/nwn /usr/bin || die mlink /usr/games/nwn/nwn-dmclient /usr/bin/nwn-dmclient || die # menu-entry for kde and gnome minstallpixmap nwn.png || die minstallpixmap nwn-dmc.png || die minstall_desktop_icon \ --name "Neverwinter Nights" \ --comment "Role Playing Game" \ --file nwn \ --exec /usr/bin/nwn \ --icon nwn.png \ --categories Game,RolePlaying \ || die minstall_desktop_icon \ --name "Neverwinter Nights (Dungeon Master Client)" \ --comment "Role Playing Game" \ --file nwn-dmc \ --exec /usr/bin/nwn-dmclient \ --icon nwn-dmc.png \ --categories Game,RolePlaying \ || die }