# $Header: /magellan-cvs/smage/nwn-resources/nwn-resources-1.29-r3.smage2,v 1.4 2008/02/07 14:23:51 niro Exp $ PNAME="nwn-resources" PVER="1.29" PBUILD="r3" PCATEGORIE="x11-games" STATE="testing" DESCRIPTION="Neverwinter Nights resource files." HOMEPAGE="http://nwn.bioware.com/index.html" DEPEND=">= virtual/opengl >= media-libs/libsdl-1.2.9" SRCRESOURCES="nwresources${PVER/.}.tar.gz" SRCCLIENT="nwclient${PVER/.}.tar.gz" SRCDIR="${BUILDDIR}/nwn" NOSTRIP=true sminclude mtools SRC_URI=( http://nwdownloads.bioware.com/neverwinternights/linux/${PVER/.}/${SRCCLIENT} http://files.bioware.com/neverwinternights/updates/linux/${SRCRESOURCES} ) src_prepare() { munpack ${SRCRESOURCES} || die munpack ${SRCCLIENT} ${SRCDIR} || die } src_install() { cd ${SRCDIR} # needed directories minstalldir /usr/games/nwn || die minstalldir /usr/share/docs/ || die mv ${SRCDIR}/* ${BINDIR}/usr/games/nwn || die # mark empty directories undeletable mkeepdir /usr/games/nwn/hak || die mkeepdir /usr/games/nwn/localvault || die mkeepdir /usr/games/nwn/portraits || die mkeepdir /usr/games/nwn/saves || die mkeepdir /usr/games/nwn/servervault || die # fix permissions mchown -R root:games /usr/games/nwn || die # these dirs should be writeable to the group too mchmod -R 0775 /usr/games/nwn/saves || die mchmod -R 0775 /usr/games/nwn/localvault || die mchmod -R 0775 /usr/games/nwn/dmvault || die mchmod 0775 /usr/games/nwn || die # fix execs mchmod 0755 /usr/games/nwn/patch.key || die mchmod 0755 /usr/games/nwn/nwn || die mchmod 0755 /usr/games/nwn/dmclient || die # these files comes along with nwn updates or are unneeded rm ${BINDIR}/usr/games/nwn/nwmain || die rm ${BINDIR}/usr/games/nwn/nwserver || die rm ${BINDIR}/usr/games/nwn/fixinstall || die rm ${BINDIR}/usr/games/nwn/nwn || die rm ${BINDIR}/usr/games/nwn/dmclient || die # want to use our libsdl rm -rf ${BINDIR}/usr/games/nwn/lib || die }