# SliTaz package receipt.

PACKAGE="zim"
VERSION="0.55"
CATEGORY="utilities"
SHORT_DESC="A desktop wiki."
MAINTAINER="gokhlayeh@slitaz.org"
DEPENDS="python pygtk pygobject python-simplejson python-xdg desktop-file-utils shared-mime-info xdg-utils"
BUILD_DEPENDS="$DEPENDS pycairo-dev pygobject-dev pygtk-dev python-dev"
TARBALL="$PACKAGE-$VERSION.tar.gz"
WEB_SITE="http://zim-wiki.org/"
WGET_URL="http://zim-wiki.org/downloads/$TARBALL"
TAGS="wiki notebook"

# Rules to configure and make the package.
compile_rules()
{
	cd $src
	./setup.py install --root=$DESTDIR install
}

# Rules to gen a SliTaz package suitable for Tazpkg.
genpkg_rules()
{
	mkdir -p $fs/usr
	cp -a $_pkg/usr $fs
}

post_install()
{
	echo -n "Processing post-install commands..." 
	# Create mimeinfo.cache in /usr/share/applications
	chroot "$1/" update-desktop-database
	chroot "$1/" /usr/bin/update-mime-database /usr/share/mime
	chroot "$1/" xdg-icon-resource install --context mimetypes \
--size 64 /usr/share/pixmaps/zim.png application-x-zim-notebook
	status
}