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

pkgname=lpairs
pkgver=1.0.4
pkgrel=1gv
arch=i486
source=(http://prdownloads.sourceforge.net/lgames/lpairs-$pkgver.tar.gz)
docs=("readme" "install" "copying" "changelog" "authors" "news" "todo" "about-nls")
url=http://lgames.sourceforge.net/index.php?action=show_project&project=LPairs

slackdesc=\
(
#|-----handy-ruler------------------------------------------------------|
"lpairs (a classical memory game)"
"LPairs is a classical memory game. This means you have to find pairs"
"of identical cards which will then be removed. Your time and tries"
"needed will be counted but there is no highscore chart or limit to"
"this."
)


build() {
	cd $startdir/src/$pkgname-$pkgver
	./configure --prefix=/usr --libdir=/usr/lib${LIBDIRSUFFIX} --localstatedir=/var --sysconfdir=/etc
	make || return 1
	make install DESTDIR=$startdir/pkg

	mkdir -p $startdir/pkg/usr/share/applications
	cp lpairs.desktop $startdir/pkg/usr/share/applications/
	sed -i "s/.png//" $startdir/pkg/usr/share/applications/lpairs.desktop
	echo "Categories=Game;LogicGame;" >> $startdir/pkg/usr/share/applications/lpairs.desktop

	mkdir -p $startdir/pkg/usr/share/icons/hicolor/48x48/apps
	cp lpairs.png $startdir/pkg/usr/share/icons/hicolor/48x48/apps/
}