# SliTaz package receipt.

PACKED_SIZE="348.0K"
UNPACKED_SIZE="1.5M"
PACKAGE="alsa-lib"
VERSION="1.2.7"
CATEGORY="multimedia"
SHORT_DESC="Alsa sound libraries."
MAINTAINER="pankso@slitaz.org"
LICENSE="LGPL2.1"
WEB_SITE="https://www.alsa-project.org/wiki/Main_Page"

TARBALL="$PACKAGE-$VERSION.tar.bz2"
WGET_URL="ftp://ftp.alsa-project.org/pub/lib/$TARBALL"

SUGGESTED="alsa-ucm-conf"
DEPENDS="linux"

HOST_ARCH="i486 arm"

# What is the latest version available today?
current_version()
{
	wget -O - https://www.alsa-project.org/wiki/Download 2>/dev/null | \
	sed '/alsa-lib-/!d;s|.*alsa-lib-||;s|.tar.*||;q'
}

# Rules to configure and make the package.
compile_rules()
{
	./configure			\
		--disable-python	\
		$CONFIGURE_ARGS &&
	make &&
	make install
}

# Rules to gen a SliTaz package suitable for Tazpkg.
genpkg_rules()
{
	# Enable software mixing for multiple audio streams
	mkdir -p $fs/etc
	cp $stuff/asound.conf		$fs/etc

	mkdir -p $fs/usr/lib
	mkdir -p $fs/usr/share

	cp -a $install/usr/bin		$fs/usr
	cp -a $install/usr/lib/*.so*	$fs/usr/lib
	cp -a $install/usr/share/alsa	$fs/usr/share
}
