description="Utilities for configuring and using ALSA"
url="http://www.alsa-project.org"

packager="spiky <spiky@nutyx.org>"
contributors="Pierre,Tnut"

makedepends=(alsa-lib xmlto libsamplerate)
run=(gawk dialog)

PKGMK_GROUPS=(man)

name=alsa-utils
version=1.2.12
runyx_version=20201011

source=(https://download.tuxfamily.org/nutyx/files/runyx-${runyx_version}.tar.xz
	https://www.alsa-project.org/files/pub/utils/$name-$version.tar.bz2)

build() {

cd $name-$version
./configure --prefix=/usr \
--disable-alsaconf \
--disable-bat \
--disable-xmlto \
--with-curses=ncursesw
make
make DESTDIR=$PKG install

# Service
cd ../runyx-${runyx_version}
make DESTDIR=$PKG install-sysv-alsa

}
uptodate() {
local url ext

url="https://www.alsa-project.org/files/pub/utils/"
ext=".tar.bz2"
lynx -read_timeout=20 -dump -listonly -nonumbers \
$url|grep $name-[0-9]|sed "s@$url$name-@@"|sed "s@$ext@@"|\
sort|tail -1
}
