#Packager: George Vlahavas <vlahavas~at~gmail~dot~com>

pkgname=sdlscavenger
pkgver=145
pkgrel=2gv
source=("http://downloads.sourceforge.net/project/sdlscavenger/sdlscavenger/LatestVersion/sdlscav-145_2008_06_11.tgz" "makefile.patch" "libpath.patch" "sdlscavenger.desktop")
docs=("readme" "install" "copying" "changelog" "authors" "news" "todo" "doc" "new_features" "strategy")
url=https://sourceforge.net/projects/sdlscavenger

slackdesc=\
(
#|-----handy-ruler------------------------------------------------------|
"sdlscavenger (a game similar to Lode Runner)"
"Scavenger is a cool arcade/thinking game very much like Lode Runner."
"You've got to run around and collect objects while avoiding enemies."
"Some objects are buried and you've got to dig down to get at them."
"It's an addictive game and some of the levels are devilishly (cruelly)"
"complicated to solve."
)


build() {
	cd $startdir/src/sdlscav-$pkgver
	
	patch -p0 < $startdir/src/makefile.patch || exit 1
	patch -p1 < $startdir/src/libpath.patch || exit 1
	sed -i "s/-O2/$CFLAGS/" Makefile
	
	mkdir -p $startdir/pkg/usr/share/applications
	cp $startdir/src/sdlscavenger.desktop $startdir/pkg/usr/share/applications/
	mkdir -p $startdir/pkg/usr/share/icons/hicolor/32x32/apps
	cp data/scav.png $startdir/pkg/usr/share/icons/hicolor/32x32/apps/sdlscavenger.png

	make
	make install DESTDIR=$startdir/pkg

}