summaryrefslogtreecommitdiff
path: root/nwn-diamond/Pkgfile
blob: f388e3d17e5e75dc59e16514fd058ce7299832ff (plain)
    1 # Description: Neverwinter Nights linux client (Diamond Edition)
    2 # URL: http://nwn.bioware.com/downloads/linuxclient.html
    3 # Maintainer: Matt Housh, jaeger at morpheus dot net
    4 # Depends on: x11, libsdl
    5 
    6 name=nwn-diamond
    7 version=1.69
    8 release=1
    9 source=(http://nwdownloads.bioware.com/neverwinternights/linux/gold/nwclientgold.tar.gz \
   10 	http://nwdownloads.bioware.com/neverwinternights/linux/161/nwclienthotu.tar.gz \
   11 	http://files.bioware.com/neverwinternights/updates/linux/169/English_linuxclient169_xp2.tar.gz \
   12 	http://jaeger.morpheus.net/linux/crux/files/nwn.png \
   13 	run-nwn.sh)
   14 
   15 # override pkgmk's unpack_source() function so that the game sources don't
   16 # all get munged into the same place, overwriting important files.
   17 
   18 unpack_source() {
   19 
   20 	# first, get the files we need from the diamond edition disc
   21 	[ -z "$CDROM_LOCATION" ] && CDROM_LOCATION=/mnt/dvd
   22 	DISCFILES="Data_Shared Data_linux data/XP1 data/XP2"
   23 	for FILE in $DISCFILES
   24 	do
   25 		if [ ! -f $CDROM_LOCATION/$FILE.zip ]
   26 		then
   27 			echo -e "\nCould not find Data_Shared.zip in $CDROM_LOCATION! Please make sure your diamond edition disc is mounted. If the mount location is not $CDROM_LOCATION, please set the CDROM_LOCATION environment variable to the correct mountpoint.\n"
   28 			exit 1
   29 		fi
   30 		COMMAND="unzip -q -o $CDROM_LOCATION/$FILE.zip -d $SRC"
   31 		echo $COMMAND; $COMMAND
   32 	done
   33 
   34 	# now deal with the source array
   35 	mkdir $SRC/nwn
   36 	COMMAND="tar -C $SRC -zxf $PKGMK_SOURCE_DIR/nwclientgold.tar.gz"
   37 	echo $COMMAND; $COMMAND
   38 	COMMAND="tar -C $SRC -zxf $PKGMK_SOURCE_DIR/nwclienthotu.tar.gz"
   39 	echo $COMMAND; $COMMAND
   40 	COMMAND="tar -C $SRC -zxf $PKGMK_SOURCE_DIR/English_linuxclient168_xp2.tar.gz"
   41 	echo $COMMAND; $COMMAND
   42 	COMMAND="cp $PKGMK_SOURCE_DIR/nwn.png $SRC"
   43 	echo $COMMAND; $COMMAND
   44 	COMMAND="cp run-nwn.sh $SRC"
   45 	echo $COMMAND; $COMMAND
   46 }
   47 
   48 build() {
   49 	mkdir -p $PKG/usr/games/nwn $PKG/usr/bin $PKG/usr/share/pixmaps
   50 	mv $SRC/* $PKG/usr/games/nwn
   51 	mv $PKG/usr/games/nwn/run-nwn.sh $PKG/usr/bin/nwn
   52 	mv $PKG/usr/games/nwn/nwn.png $PKG/usr/share/pixmaps/
   53 	find $PKG ! -type d -exec chmod -x '{}' \;
   54 	chmod 755 $PKG/usr/bin/nwn \
   55 		$PKG/usr/games/nwn/{nwn,nwmain,nwserver,fixinstall}
   56 	chown -R root:games $PKG/usr/games/nwn
   57 	chmod -R ug+rw,o+r-w $PKG/usr/games/nwn
   58 	(cd $PKG/usr/games/nwn && ./fixinstall)
   59 	rm -rf $PKG/usr/games/nwn/docs \
   60 		$PKG/usr/games/nwn/readme*.txt \
   61 		$PKG/usr/games/nwn/movies*.txt \
   62 		$PKG/usr/games/nwn/SDL-1.2.5 \
   63 		$PKG/usr/games/nwn/NWN*.txt
   64 	sed -i -e 's|=./lib:|=|' $PKG/usr/games/nwn/nwn
   65 }

Generated by cgit