# SliTaz package receipt.

PACKED_SIZE="32.0K"
UNPACKED_SIZE="116.0K"
PACKAGE="libao"
VERSION="1.2.2"
CATEGORY="multimedia"
SHORT_DESC="Cross-platform audio output library and plugins."
MAINTAINER="rj.rohit@gmail.com"
LICENSE="GPL2"
WEB_SITE="https://xiph.org/ao/"

TARBALL="$PACKAGE-$VERSION.tar.gz"
WGET_URL="https://github.com/xiph/$PACKAGE/archive/$VERSION.tar.gz"

DEPENDS="alsa-lib glibc-base"
BUILD_DEPENDS="alsa-lib-dev autoconf automake libtool"

HOST_ARCH="i486 arm"

current_version()
{
	wget -O - ${WGET_URL%/arch*}/tags 2>/dev/null | \
	sed '/archive.*tar/!d;s|.*/\(.*\).tar.*|\1|;q'
}

# Rules to configure and make the package.
compile_rules()
{
	./autogen.sh &&
	./configure		\
		--enable-alsa09	\
		--disable-arts	\
		$CONFIGURE_ARGS &&
	make &&
	make install
}

# Rules to gen a SliTaz package suitable for Tazpkg.
genpkg_rules()
{
	mkdir -p $fs/usr/lib/ao/plugins-4
	mkdir -p $fs/etc

	cp -a $install/usr/lib/ao/plugins-4/*.so	$fs/usr/lib/ao/plugins-4
	cp -a $install/usr/lib/*.so*			$fs/usr/lib

	# Add configuration file
	cp -a $stuff/libao.conf				$fs/etc
}
