# SliTaz package receipt.

PACKED_SIZE="20.0K"
UNPACKED_SIZE="48.0K"
PACKAGE="xcb-util"
VERSION="0.4.0"
CATEGORY="x-window"
SHORT_DESC="XCB Utilites"
MAINTAINER="mallory@sweetpeople.org"
LICENSE="MIT"
WEB_SITE="https://xcb.freedesktop.org/XcbUtil/"

TARBALL="$PACKAGE-$VERSION.tar.bz2"
WGET_URL="https://xcb.freedesktop.org/dist/$TARBALL"

DEPENDS="libxcb"
BUILD_DEPENDS="gperf libxcb-dev"

HOST_ARCH="i486 arm"

# Handle cross compilation
case "$ARCH" in
	arm*) BUILD_DEPENDS="libxcb-dev xorg-libXdmcp-dev" ;;
esac

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

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

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