# SliTaz package receipt.

PACKAGE="xarchive"
VERSION="0.2.8-6"
CATEGORY="x-window"
SHORT_DESC="A GTK+ front-end for command line archiving tools."
MAINTAINER="erjo@slitaz.org"
TARBALL="$PACKAGE-$VERSION.tar.gz"
DEPENDS="gtk+ xorg-libXdamage"
BUILD_DEPENDS="pkg-config gtk+ gtk+-dev"
SUGGESTED="zip rar unace arj lha p7zip lzop linux-squashfs cromfs cabextract \
xz lrzip"
WEB_SITE="http://xarchive.sourceforge.net/"
WGET_URL="$SF_MIRROR/$PACKAGE/$TARBALL"

# Rules to configure and make the package.ls sr	
compile_rules()
{
	cd $src
	# patch tar-wrap for busybox tar option
	[ -f done.slitaz-xarchive-wrappers-0.2.8-6.patch ] || \
	patch -p1 -i $stuff/slitaz-xarchive-wrappers-0.2.8-6.patch
	touch done.slitaz-xarchive-wrappers-0.2.8-6.patch

	./configure --prefix=/usr --infodir=/usr/share/info \
	--mandir=/usr/share/man $CONFIGURE_ARGS &&

	make &&
	make DESTDIR=$PWD/_pkg install
}

# Rules to gen a SliTaz package suitable for Tazpkg.
genpkg_rules()
{
	mkdir -p $fs/usr/lib/xarchive/wrappers
	cp -a $_pkg/usr/bin $fs/usr
	sed -i 's|#!\s*/bin/bash|#!/bin/sh|' $_pkg/usr/lib/xarchive/wrappers/*
	cp $stuff/slitaz-wrap.sh $fs/usr/lib/xarchive/wrappers
}