# Template file for 'libao'
pkgname=libao
version=1.2.0
revision=3
build_style=gnu-configure
configure_args="--enable-alsa-mmap"
hostmakedepends="automake libtool pkg-config"
makedepends="alsa-lib-devel
 $(vopt_if pulseaudio pulseaudio-devel)
 $(vopt_if sndio sndio-devel)"
conf_files="/etc/libao.conf"
homepage="http://xiph.org/ao/"
short_desc="Cross-platform audio output library"
maintainer="Juan RP <xtraeme@voidlinux.eu>"
license="GPL-2"
distfiles="http://downloads.xiph.org/releases/ao/${pkgname}-${version}.tar.gz"
checksum=03ad231ad1f9d64b52474392d63c31197b0bc7bd416e58b1c10a329a5ed89caf

build_options="pulseaudio sndio"
build_options_default="pulseaudio"

pre_configure() {
	autoreconf -fi
}
post_install() {
	vconf ${FILESDIR}/libao.conf
}

libao-devel_package() {
	depends="${sourcepkg}>=${version}_${revision}"
	short_desc+=" - development files"
	pkg_install() {
		vmove usr/include
		vmove usr/lib/pkgconfig
		vmove usr/lib/*.so
		vmove usr/share/doc
		vmove usr/share/aclocal
	}
}
