#Packager: Frédéric Galusik <fredg~at~salixos~dot~org>

pkgname=jumanji
pkgver=20120818
pkgrel=1rl
#arch=noarch
source=("http://people.salixos.org/fredg/packages/$pkgname/$pkgver/$pkgname-$pkgver.tar.gz"
 "jumanji.png"
 "jumanji.desktop")
sourcetemplate=http://people.salixos.org/fredg/packages/$pkgname/$pkgver
docs=("readme" "license")
url=http://pwmt.org/projects/jumanji

slackdesc=\
(
#|-----handy-ruler------------------------------------------------------|
"jumanji (a lightweight web browser)"
"jumanji is a highly customizable and functional web browser based on"
"the libwebkit web content engine and the gtk+ toolkit. The idea behind"
"jumanji is a web browser that provides a minimalistic and space saving"
"interface as well as an easy usage that mainly focuses on keyboard"
"interaction like vimperator does."
)


build() {
	cd $startdir/src/$pkgname-$pkgver
	
	# fix man page path & use girara GTK+2 instead of GTK+3
	sed -i'' \
		-e 's/share\///g' \
		-e 's/gtk+-3.0/gtk+-2.0/g' \
		-e 's/girara-gtk3/girara-gtk2/g' \
		-e 's/webkitgtk-3.0/webkit-1.0/g' \
		-e 's/javascriptcoregtk-3.0/javascriptcoregtk-1.0/g' \
        config.mk
  
	make DATABASE=plain DESTDIR=$startdir/pkg install || return 1

	# menu integration: desktop file & icon
	install -Dm 644  $startdir/src/jumanji.desktop \
	        $startdir/pkg/usr/share/applications/jumanji.desktop
	install -Dm 644 $startdir/src/jumanji.png \
		$startdir/pkg/usr/share/icons/hicolor/48x48/apps/jumanji.png
}