#Maintainer: George Vlahavas <vlahavas~at~gmail~dot~com>
#
# imagemagick is required to create the menu icons

pkgname=lbreakout2
pkgver=2.6.2
pkgrel=1gv
source=("http://prdownloads.sourceforge.net/lgames/lbreakout2-$pkgver.tar.gz" "lbreakout2.desktop")
docs=("readme*" "install" "copying" "changelog" "authors" "news" "todo" "about-nls" "")
url=http://lgames.sourceforge.net/index.php?project=LBreakout2

slackdesc=\
(
#|-----handy-ruler------------------------------------------------------|
"lbreakout2 (an open-source Breakout clone)"
"LBreakout2 is a sequel to LBreakout, featuring new levels, power-ups"
"and bonuses. Control your pad and deflect the ball to hit and destroy."
"all the bricks on the screen. Some of those bricks will release"
"power-ups and bonus items when hit."
)


build() {
	cd $startdir/src/$pkgname-$pkgver
	./configure --prefix=/usr --libdir=/usr/lib${LIBDIRSUFFIX} --localstatedir=/usr/share/lbreakout2 --sysconfdir=/etc --enable-sdl-net --with-docdir=/usr/doc/lbreakout2-$pkgver --build=$arch-slackware-linux
	make || return 1
	make install DESTDIR=$startdir/pkg
	mkdir -p $startdir/pkg/usr/share/applications
	cp $startdir/src/lbreakout2.desktop $startdir/pkg/usr/share/applications/
	mkdir -p $startdir/pkg/usr/share/icons/hicolor/{32x32,48x48}/apps
	convert lbreakout32.gif $startdir/pkg/usr/share/icons/hicolor/32x32/apps/lbreakout2.png
	convert lbreakout48.gif $startdir/pkg/usr/share/icons/hicolor/48x48/apps/lbreakout2.png

	rm -f $startdir/pkg/usr/share/icons/lbreakout48.gif
}