#Packager: Frédéric Galusik <fredg~at~salixos~dot~org>

pkgname=zsxd
pkgver=1.5.2
pkgrel=1fg
#arch=noarch
source=("http://www.zelda-solarus.com/downloads/$pkgname/$pkgname-$pkgver.tar.gz"
"zsxd.desktop"
"zsxd.png")
sourcetemplate=http://people.salixos.org/fredg/packages/$pkgname/$pkgver
docs=("readme.txt" "changelog")
url=http://www.solarus-engine.org/games/zelda-mystery-of-solarus-dx/

slackdesc=\
(
#|-----handy-ruler------------------------------------------------------|
"zsxd (Zelda: Mystery of Solarus XD)"
"This package contains the data files of the quest Zelda: Mystery of"
"Solarus DX, a parodic mini-game."
"This quest is a free, open-source game that works with Solarus,"
"an open-source Zelda-like 2D game engine."
"To play this game, you need solarus."
)

build() {
	cd $SRC/$pkgname-$pkgver
	cmake -D CMAKE_INSTALL_PREFIX=/usr \
          -D CMAKE_BUILD_TYPE=Release .
        make
	make install DESTDIR=$PKG PREFIX=/usr

	# Desktop integration
	# The icon comes from http://oclero.deviantart.com/art/Zelda-Solarus-Solarus-Amulet-159367341
	install -Dm 644 $SRC/zsxd.png \
		$PKG/usr/share/icons/hicolor/48x48/apps/zsxd.png
	install -Dm 644 $SRC/zsxd.desktop \
        	$PKG/usr/share/applications/zsxd.desktop
}