# Maintainer: Luke R. <g4jc@openmailbox.org> GPG: rsa4096/3EAE8697

pkgname=penguin-command
pkgver=1.6.11
pkgrel=4
pkgdesc="Clone of the classic Missile Command game with better graphics and music."
arch=('x86_64' 'i686' 'armv7h')
url="http://www.linux-games.com/penguin-command/"
license=('GPL2')
depends=('sdl' 'sdl_mixer' 'sdl_image')
source=("http://downloads.sourceforge.net/$pkgname/$pkgname-$pkgver.tar.gz"
'penguin-command.desktop')
sha512sums=('ba41a7fbf3c07149fb6f6cf60091afda9de3c9f8f04e541d7b62ba744b04e5db7eecc5aa2391a71b72ccf6f544d397a5994a6f7aee0907211ced1686fe517646'
            '87c9b1ac12c3769860b9e2f9ebf884e584f53933dd901998395f17942c5b1cc57e37ed0870d2a9d0f2b4c787701c090654991fd1f1cc7eae919b47e917e8e121')

build() {
  cd $pkgname-$pkgver
	./configure --prefix=/usr --localstatedir=/var --sysconfdir=/etc --sbindir=/usr/bin
	make
}

package() {
  cd $pkgname-$pkgver
   ./configure --prefix=/usr --localstatedir=/var --sysconfdir=/etc --sbindir=/usr/bin
  make DESTDIR="$pkgdir/" install

  # Install a desktop entry
  install -Dm644 data/gfx/20explo.png "${pkgdir}/usr/share/pixmaps/${pkgname}.png"
  install -Dm644 ../${pkgname}.desktop "${pkgdir}/usr/share/applications/${pkgname}.desktop"
}
