#Maintainer Dimitris Tzemos <djemos@slackel.gr>

pkgname=obkey
pkgver=1.0
pkgrel=3dj
source=(http://obkey.googlecode.com/files/$pkgname-$pkgver.tar.gz)
sourcetemplate=http://people.salixos.org/djemos/salix/openbox/$pkgname
docs=("copying" "news")
url=http://code.google.com/p/obkey

slackdesc=\
(
#|-----handy-ruler------------------------------------------------------|
"obkey (openbox key editor)"
"ObKey is the Openbox (window manager) Key Editor"
)

build() {
cd $startdir/src/$pkgname-$pkgver
python setup.py install --prefix=/usr --root=$startdir/pkg 

mkdir -p $startdir/pkg/usr/share/icons/hicolor/32x32/apps || return 1
mkdir -p $startdir/pkg/usr/share/pixmaps || return 1

cp $startdir/pkg/usr/share/obkey/icons/add_child.png $startdir/pkg/usr/share/pixmaps/obkey.png || return 1
cp $startdir/pkg/usr/share/obkey/icons/add_child.png $startdir/pkg/usr/share/icons/hicolor/32x32/apps/obkey.png || return 1

mkdir -p  $startdir/pkg/usr/share/applications || return 1
cat <<- EOF > $startdir/pkg/usr/share/applications/$pkgname.desktop
[Desktop Entry]
Version=1.0
Type=Application
Name=obkey
Exec=obkey
Icon=obkey
Categories=Application;Utility;
Comment=Openbox Key Editor
EOF
}