# SliTaz package receipt.

PACKED_SIZE="776.0K"
UNPACKED_SIZE="3.2M"
PACKAGE="gst-plugins-base"
VERSION="0.10.36"
SERIES="0.10"
CATEGORY="multimedia"
SHORT_DESC="GStreamer Base Plugins"
MAINTAINER="jozee@slitaz.org"
LICENSE="GPL2"
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="gstreamer pango alsa-lib libogg libvorbis vorbis-tools udev \
xorg-libXv xorg-libXvMC cdparanoia-III orc" # libtheora libtheora-enc
BUILD_DEPENDS="gstreamer-dev pango-dev alsa-lib-dev libogg-dev \
libtheora-dev libtheora-enc libvorbis-dev udev-dev xorg-libXv-dev \
xorg-libXvMC-dev util-linux-uuid-dev"

# Handle cross compilation
case "$ARCH" in
	i?86) BUILD_DEPENDS="$BUILD_DEPENDS cdparanoia-III-dev orc-dev \
gobject-introspection-dev xorg-dev" ;;
esac

# Rules to configure and make the package.
compile_rules()
{
	case "$ARCH" in
		i?86) ;;
		*) export CPPFLAGS="$CPPFLAGS -I/cross/$ARCH/sysroot/usr/include" ;;
	esac
	./configure \
		--prefix=/usr \
		--sysconfdir=/etc \
		--localstatedir=/var \
		--enable-experimental \
		--disable-static \
		--disable-debug \
		--disable-gnome_vfs \
		--with-package-name="GStreamer Base Plugins ($SERIES)" \
		--with-package-origin="http://www.slitaz.org/" \
		$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/share/locale
	mv $install/usr/bin $fs/usr
	mv $install/usr/lib/*.so* $fs/usr/lib
	mv $install/usr/lib/gstreamer-$SERIES/*.so* $fs/usr/lib/gstreamer-$SERIES
	# mv $install/usr/lib/girepository-1.0 $fs/usr/lib
	# for locale in $LOCALES; do
	# 	mv $install/usr/share/locale/$locale $fs/usr/share/locale
	# done
}
