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

pkgname=residualvm
pkgver=0.1.1
pkgrel=1gv
source=("https://downloads.sourceforge.net/project/residualvm/residualvm/$pkgver/residualvm-$pkgver-sources.tar.bz2")
docs=("readme" "install" "copying*" "copyright" "changelog" "authors" "news" "todo")
url=http://residualvm.org

slackdesc=\
(
#|-----handy-ruler------------------------------------------------------|
"residualvm (a 3D game interpreter)"
"ResidualVM is a cross-platform 3D game interpreter which allows you to"
"play LucasArts' LUA-based 3D adventures: Grim Fandango and Escape from"
"Monkey Island, provided you already have their data files. Residual"
"just replaces the executables shipped with the games, allowing you to"
"play them on systems for which they were never designed!"
)


build() {
	cd $startdir/src/$pkgname-$pkgver
	./configure \
		--prefix=/usr \
		--libdir=/usr/lib${LIBDIRSUFFIX} \
		--docdir=/usr/doc/$pkgname-$pkgver \
		--enable-release
	make -j $numjobs || return 1
	make install DESTDIR=$startdir/pkg

	mkdir -p $startdir/pkg/usr/share/applications
	cp dists/residualvm.desktop $startdir/pkg/usr/share/applications/
	
	mkdir -p $startdir/pkg/usr/share/icons/hicolor/256x256/apps
	cp icons/residualvm.png $startdir/pkg/usr/share/icons/hicolor/256x256/apps/
	mkdir -p $startdir/pkg/usr/share/icons/hicolor/scalable/apps
	cp icons/residualvm.svg $startdir/pkg/usr/share/icons/hicolor/scalable/apps/
}