# SliTaz package receipt.

PACKAGE="emelfm2"
VERSION="0.7.2"
CATEGORY="system-tools"
SHORT_DESC="GTK powerfull file manager."
MAINTAINER="pankso@slitaz.org"
DEPENDS="gtk+ xorg-libXdamage"
BUILD_DEPENDS="pkg-config gtk+ gtk+-dev xorg-xproto libmagic-dev"
TARBALL="$PACKAGE-$VERSION.tar.bz2"
WEB_SITE="http://emelfm2.net/"
WGET_URL="http://emelfm2.net/rel/$TARBALL"
TAGS="file-manager"

# Rules to configure and make the package.
compile_rules()
{
	cd $src
	sed -i 's|xpdf|epdfview|g' src/e2_filetype.c
	sed -i 's|gview|gpicview|g' src/e2_filetype.c
	sed -i 's|totem|xine|g' src/e2_filetype.c
	sed -i 's|Totem|Xine|g' src/e2_filetype.c
	make PREFIX=/usr &&
	make i18n PREFIX=/usr &&
	make install PREFIX=$PWD/_pkg/usr &&
	make install_i18n PREFIX=$PWD/_pkg/usr
}

# Rules to gen a SliTaz package suitable for Tazpkg.
genpkg_rules()
{
	mkdir -p $fs/usr/share/locale $fs/usr/share/applications
	cp -a $stuff/emelfm2.dekstop $fs/usr/share/applications
	cp -a $_pkg/usr/bin $fs/usr
	cp -a $_pkg/usr/lib $fs/usr
	cp -a $_pkg/usr/share/pixmaps $fs/usr/share
	cd $fs/usr/share/pixmaps
	ln -s emelfm2/emelfm2_32.png emelfm2.png
}