# SliTaz package receipt.

PACKAGE="tar"
VERSION="1.34"
CATEGORY="utilities"
SHORT_DESC="GNU tar archiving tools."
MAINTAINER="pankso@slitaz.org"
TARBALL="$PACKAGE-$VERSION.tar.bz2"
WEB_SITE="http://www.gnu.org/software/tar/"
WGET_URL="http://ftp.gnu.org/gnu/$PACKAGE/$TARBALL"
TAGS="archive compression"

# Rules to configure and make the package.
compile_rules()
{
	cd $src
	# this is needed since configure can't be run as root with out it
	export FORCE_UNSAFE_CONFIGURE=1
	./configure \
		--prefix=/usr \
		--libexecdir=/usr/lib/$PACKAGE \
		$CONFIGURE_ARGS
	make
	make DESTDIR=$PWD/_pkg install
}

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

# Prevent erasing busybox...
pre_install()
{
	local root
	root=$1
	rm -f $root/bin/tar
}

post_remove()
{
	ln -s /bin/busybox /bin/tar
}