# Maintainer: Antoni Aloy <aaloytorrens@gmail.com>
pkgname=toppler
pkgver=1.1.6
pkgrel=2
pkgdesc="Clone of the Nebulus game on old 8 and 16 bit machines"
url="https://toppler.sourceforge.net/"
arch="all"
license="GPL-2.0-only"
depends="$pkgname-data"
makedepends="sdl12-compat-dev sdl_mixer-dev libzip-dev"
source="
	https://sourceforge.net/projects/aat-linux-repository/files/sources/alpine/toppler/toppler-$pkgver.tar.gz
	toppler.desktop
	"
subpackages="$pkgname-data::noarch $pkgname-doc"

prepare() {
	default_prepare
	update_config_guess
	update_config_sub
}

build() {
	./configure \
		--build=$CBUILD \
		--host=$CHOST \
		--prefix=/usr \
		--localstatedir=/usr/share/
	make
}

check() {
	make check
}

package() {
	make DESTDIR="$pkgdir" install
	install -Dm644 "$srcdir"/toppler.desktop \
	"$pkgdir"/usr/share/applications/toppler.desktop
}

data() {
	pkgdesc="$pkgdesc (data files)"
	amove /usr/share/toppler
}

sha512sums="
8debc79c971697c660eb918b84772d9e6f9a1a85c9660c43a52a49f19a31605ee3fabf526a88287916ef2e6073a938b4704536a3ef947d70d533a06d4569ab05  toppler-1.1.6.tar.gz
bed53b15f35ab066248885116d0de5977668bd0dcbf25cd2e203b6b2d6b8a51a9c3f8683c00461efa74c32c05b57547e7397d73b58f0f46fc64620c479885cc6  toppler.desktop
"
