# SliTaz package receipt.

PACKED_SIZE="496.0K"
UNPACKED_SIZE="1.9M"
PACKAGE="gstreamer"
VERSION="0.10.36"
SERIES="0.10"
CATEGORY="multimedia"
SHORT_DESC="GStreamer Multimedia Framework"
MAINTAINER="jozee@slitaz.org"
LICENSE="LGPL2"
TARBALL="$PACKAGE-$VERSION.tar.xz"
WEB_SITE="http://gstreamer.freedesktop.org/"
WGET_URL="$WEB_SITE/src/$PACKAGE/$TARBALL"
HOST_ARCH="i486 arm"

LOCALES="da de es fr id it pt_BR ru zh_CN"
DEPENDS="glib libgio libxml2"
BUILD_DEPENDS="glib-dev libgio-dev libxml2-dev"

# Handle cross compilation
case "$ARCH" in
	i?86) BUILD_DEPENDS="$BUILD_DEPENDS gobject-introspection-dev \
python-dev bison flex m4 valgrind" 
		origin="http://www.slitaz.org" ;;
	arm*) 
		origin="http://arm.slitaz.org"
esac

# Rules to configure and make the package.
compile_rules()
{
	./configure \
		--sysconfdir=/etc \
		--localstatedir=/var \
		--libexecdir=/usr/lib \
		--enable-silent-rules \
		--disable-static \
		--disable-examples \
		--disable-debug \
		--with-package-name="GStreamer ($SERIES)" \
		--with-package-origin="$origin" \
		$CONFIGURE_ARGS &&
	make $MAKEFLAGS && make install
}

# Rules to gen a SliTaz package suitable for Tazpkg.
genpkg_rules()
{
	mkdir -p $fs/usr/lib/gstreamer-$SERIES $fs/usr/bin $fs/usr/share/locale
	cp -a $install/usr/bin/*-$SERIES $fs/usr/bin
	cp -a $install/usr/lib/*.so* $fs/usr/lib
	cp -a $install/usr/lib/gstreamer-$SERIES/*.so $fs/usr/lib/gstreamer-$SERIES
	cp -a $install/usr/lib/gstreamer-$SERIES/gst-* $fs/usr/lib/gstreamer-$SERIES
	# for locale in $LOCALES; do
	# 	mv $install/usr/share/locale/$locale $fs/usr/share/locale
	# done
}
