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

pkgname=gonvert
pkgver=0.2.25
pkgrel=1gv
arch=noarch
source=("http://www.unihedron.com/projects/gonvert/downloads/gonvert-$pkgver.tar.gz")
docs=("readme" "install" "copying" "changelog" "authors" "news" "todo" "thanks" "faq")
url=http://www.unihedron.com/projects/gonvert/index.php

slackdesc=\
(
#|-----handy-ruler------------------------------------------------------|
"gonvert (a unit conversion utility)"
"gonvert is a conversion utility that allows conversion between many"
"units like CGS, Ancient, Imperial with many categories like length,"
"mass, numbers, etc. All units converted values shown at once as you"
"type. Easy to add/change your own units."
)


build() {
	cd $startdir/src/$pkgname-$pkgver
	sed -i -e 's,/usr/local,/usr,' Makefile
	make install DESTDIR=$startdir/pkg

	mkdir -p $startdir/pkg/usr/share/icons/hicolor/48x48/apps/
	( cd $startdir/pkg/usr/share/icons/hicolor/48x48/apps; ln -s ../../../../pixmaps/gonvert.png gonvert.png )
	rm $startdir/pkg/usr/share/pixmaps/gonvert-icon_alternative.png

	mkdir -p $startdir/pkg/usr/share/applications
	cp gonvert.desktop $startdir/pkg/usr/share/applications/
	rm -rf $startdir/pkg/usr/share/gnome
	sed -i -e 's/.png//' $startdir/pkg/usr/share/applications/gonvert.desktop
}