audio/alsa-utils: initial import, closes #1201

Mon, 30 Sep 2019 20:08:00 +0200

author
David Demelier <markand@malikania.fr>
date
Mon, 30 Sep 2019 20:08:00 +0200
changeset 1154
a8ea380caafe
parent 1153
1d295d9e9acd
child 1155
4575482dd375

audio/alsa-utils: initial import, closes #1201

audio/alsa-utils/alsa-utils.sh file | annotate | diff | comparison | revisions
audio/alsa-utils/alsa-utils.sha1 file | annotate | diff | comparison | revisions
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/audio/alsa-utils/alsa-utils.sh	Mon Sep 30 20:08:00 2019 +0200
@@ -0,0 +1,101 @@
+#!/bin/sh
+#
+# Copyright (c) 2019 David Demelier <markand@malikania.fr>
+#
+# Permission to use, copy, modify, and/or distribute this software for any
+# purpose with or without fee is hereby granted, provided that the above
+# copyright notice and this permission notice appear in all copies.
+#
+# THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
+# WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
+# MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
+# ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
+# WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
+# ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
+# OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
+#
+
+# TODO: add fftw dependency
+# TODO: add init script for saving/restoring levels.
+
+PKGNAME=alsa-utils
+PKGVERSION=1.1.9
+PKGREVISION=1
+PKGLICENSE="GPLv20"
+PKGSUMMARY="ALSA utilities"
+PKGDOWNLOAD="ftp://ftp.alsa-project.org/pub/utils/$PKGNAME-$PKGVERSION.tar.bz2"
+PKGDEPENDS="alsa-lib xmlto:build"
+PKGOPTIONS="ALSACONF ALSALOOP ALSAMIXER NLS"
+
+: ${CHOST:=$(uname -m)-linux-musl}
+: ${CBUILD:=$(uname -m)-linux-musl}
+: ${CC:=clang}
+: ${CFLAGS:=-O2}
+: ${LDFLAGS:=}
+: ${LIBS:=}
+: ${ALSACONF:=yes}  # Note: alsaconf.
+: ${ALSALOOP:=yes}  # Note: alsaloop, requires libsamplerate.
+: ${ALSAMIXER:=yes} # Note: alsamixer, requires ncurses.
+: ${BAT:=yes}       # Note: alsabat.
+: ${NLS:=yes}
+
+if [ "$ALSACONF" = "yes" ]; then
+	with_alsaconf="--enable-alsaconf"
+else
+	with_alsaconf="--disable-alsaconf"
+fi
+
+if [ "$ALSALOOP" = "yes" ]; then
+	PKGDEPENDS="libsamplerate $PKGDEPENDS"
+	with_alsaloop="--enable-alsaloop"
+else
+	with_alsaloop="--disable-alsaloop"
+fi
+
+if [ "$ALSAMIXER" = "yes" ]; then
+	PKGDEPENDS="ncurses $PKGDEPENDS"
+	with_alsamixer="--enable-alsamixer"
+else
+	with_alsamixer="--disable-alsamixer"
+fi
+
+if [ "$BAT" = "yes" ]; then
+	with_bat="--enable-bat"
+else
+	with_bat="--disable-bat"
+fi
+
+if [ "$NLS" = "yes" ]; then
+	PKGDEPENDS="gettext $PKGDEPENDS"
+	with_nls="--enable-nls"
+else
+	with_nls="--disable-nls"
+fi
+
+build()
+{
+	rm -rf $PKGNAME-$PKGVERSION
+	tar xvf $PKGNAME-$PKGVERSION.tar.bz2
+	cd $PKGNAME-$PKGVERSION
+
+	CC="$CC" \
+	CFLAGS="$CFLAGS" \
+	LDFLAGS="$LDFLAGS" \
+	LIBS="$LIBS" \
+	./configure \
+		--build=$CBUILD \
+		--host=$CHOST \
+		--prefix= \
+		--sbindir=/bin \
+		$with_alsaconf \
+		$with_alsaloop \
+		$with_alsamixer \
+		$with_bat \
+		$with_nls
+	make
+	make install DESTDIR=$DESTDIR
+	# find $DESTDIR -type f -name "*.la" -delete
+
+	cd ..
+	rm -rf $PKGNAME-$PKGVERSION
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/audio/alsa-utils/alsa-utils.sha1	Mon Sep 30 20:08:00 2019 +0200
@@ -0,0 +1,1 @@
+9aee48df54a6df7519f50b9b62a13217e2a91bf8  alsa-utils-1.1.9.tar.bz2

mercurial