# SliTaz package receipt.

PACKED_SIZE="28.0K"
UNPACKED_SIZE="64.0K"
PACKAGE="xorg-xauth"
VERSION="1.1"
CATEGORY="x-window"
SHORT_DESC="X authority file utility."
MAINTAINER="pankso@slitaz.org"
LICENSE="MIT"
WEB_SITE="https://www.x.org/wiki/"

SOURCE="xauth"
TARBALL="$SOURCE-$VERSION.tar.bz2"
WGET_URL="$XORG_MIRROR/app/$TARBALL"

DEPENDS="xorg-libXmu"
BUILD_DEPENDS="xorg-libXmu-dev"

HOST_ARCH="i486 arm"

case "$ARCH" in
	arm) BUILD_DEPENDS="xorg-xproto xorg-libXau-dev" ;;
esac

current_version()
{
	wget -O - $(dirname $WGET_URL) 2>/dev/null | \
	sed "/$SOURCE-[0-9]/!d;/tar/!d;s|.*$SOURCE-\\(.*\\).tar.*\".*|\\1|" | sort -Vr | sed q
}

# Rules to configure and make the package.
compile_rules()
{
	./configure			\
		--mandir=/usr/share/man \
		$CONFIGURE_ARGS &&
	make &&
	make install
}

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

	cp -a $install/usr/bin	$fs/usr
	ln -s ../bin $fs/usr/X11R6/bin
}
