# SliTaz package receipt.

PACKED_SIZE="108.0K"
UNPACKED_SIZE="684.0K"
PACKAGE="libxcb"
VERSION="1.9.1"
CATEGORY="x-window"
SHORT_DESC="A C binding to the X11 protocol"
MAINTAINER="pankso@slitaz.org"
LICENSE="other"
WEB_SITE="http://xcb.freedesktop.org/"
TARBALL="$PACKAGE-$VERSION.tar.bz2"
WGET_URL="${WEB_SITE}dist/$TARBALL"
HOST_ARCH="i486 arm"

DEPENDS="glibc-base xorg-libXau xorg-libXdmcp"
BUILD_DEPENDS="libxslt-dev xcb-proto xorg-libXau-dev xorg-libXdmcp-dev \
autoconf automake libtool"

case "$ARCH" in
	arm)
		# We need host xcb-proto libxslt-dev file installed
		BUILD_DEPENDS="libxslt-dev xcb-proto xorg-libXau-dev xorg-libXdmcp-dev" ;;
esac

# Rules to configure and make the package.
compile_rules()
{
	# http://www.linuxfromscratch.org/blfs/view/svn/x/libxcb.html
	sed -i "s|pthread-stubs||" $src/configure.ac &&
	autoreconf -fi &&
	./configure \
		--enable-xinput \
		--disable-build-docs \
		--disable-static \
		$CONFIGURE_ARGS &&
	make &&
	make DESTDIR=$DESTDIR install
}

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

