#Maintainer: George Vlahavas <vlahavas~at~gmail~dot~com>
#
# Needs texi2html and imagemagick to build

pkgname=gcompris
pkgver=9.6
pkgrel=1gv
source=("http://downloads.sourceforge.net/gcompris/gcompris-9.6.tar.gz")
docs=("ABOUT-NLS" "AUTHORS" "COPYING" "ChangeLog" "INSTALL" "NEWS" "README*" "THANKS" "TODO")
url="http://gcompris.net/"

slackdesc=\
(
#|-----handy-ruler------------------------------------------------------|
"gcompris (Educational software suite for children)"
"gcompris is an educational software suite comprising of numerous"
"activities for children aged 2 to 10. Some of the activities are"
"game orientated, but nonetheless still educational."
"GCompris offers in excess of 100 activities and more are being"
"developed."
)

build() {
        cd $startdir/src/$pkgname-$pkgver
	./configure --prefix=/usr \
		--libdir=/usr/lib${LIBDIRSUFFIX} \
		--bindir=/usr/bin --sbindir=/usr/sbin \
		--libexecdir=/usr/libexec \
		--sysconfdir=/etc \
		--sharedstatedir=/usr/com \
		--localstatedir=/var/lib \
		--includedir=/usr/include \
		--oldincludedir=/usr/include \
		--datadir=/usr/share \
		--infodir=/usr/share/info \
		--mandir=/usr/man 
	make || return 1
	make install DESTDIR=$startdir/pkg

	# fix wrong ownerships
	chown -R root:root $startdir/pkg

	# icons
	mkdir -p $startdir/pkg/usr/share/icons/hicolor/48x48/apps
	convert $startdir/pkg/usr/share/pixmaps/gcompris.png -sample 48x48 $startdir/pkg/usr/share/icons/hicolor/48x48/apps/gcompris.png || exit 1
	convert $startdir/pkg/usr/share/pixmaps/gcompris-edit.png -sample 48x48 $startdir/pkg/usr/share/icons/hicolor/48x48/apps/gcompris-edit.png || exit 1
}