diff options
author | wbx <wbx@hydrogenium.(none)> | 2009-05-17 14:41:34 +0200 |
---|---|---|
committer | wbx <wbx@hydrogenium.(none)> | 2009-05-17 14:41:34 +0200 |
commit | 219a6dab8995aad9ac4860cc1a84d6f3509a03a4 (patch) | |
tree | b9c0f3c43aebba2fcfef777592d0add39f2072f4 /package/alsa-utils |
Initial import
Diffstat (limited to 'package/alsa-utils')
-rw-r--r-- | package/alsa-utils/Config.in | 7 | ||||
-rw-r--r-- | package/alsa-utils/Makefile | 31 | ||||
-rw-r--r-- | package/alsa-utils/files/amixer.init | 30 | ||||
-rw-r--r-- | package/alsa-utils/ipkg/alsa-utils.control | 4 | ||||
-rw-r--r-- | package/alsa-utils/ipkg/alsa-utils.postinst | 4 | ||||
-rw-r--r-- | package/alsa-utils/patches/patch-alsactl_init_parse_c | 21 |
6 files changed, 97 insertions, 0 deletions
diff --git a/package/alsa-utils/Config.in b/package/alsa-utils/Config.in new file mode 100644 index 000000000..64fc5ab94 --- /dev/null +++ b/package/alsa-utils/Config.in @@ -0,0 +1,7 @@ +config ADK_PACKAGE_ALSA_UTILS + prompt "alsa-utils........................ ALSA utilities / mixer" + tristate + default n + help + + http://www.alsa-project.org/ diff --git a/package/alsa-utils/Makefile b/package/alsa-utils/Makefile new file mode 100644 index 000000000..6359b9ea0 --- /dev/null +++ b/package/alsa-utils/Makefile @@ -0,0 +1,31 @@ +# $Id$ +#- +# This file is part of the OpenADK project. OpenADK is copyrighted +# material, please see the LICENCE file in the top-level directory. + +include ${TOPDIR}/rules.mk + +PKG_NAME:= alsa-utils +PKG_VERSION:= 1.0.19 +PKG_RELEASE:= 2 +PKG_MD5SUM:= 5ff0379c707c1a29083233edc9ab4e06 +MASTER_SITES:= ftp://ftp.task.gda.pl/pub/linux/misc/alsa/utils/ \ + ftp://ftp.alsa-project.org/pub/utils/ +DISTFILES:= ${PKG_NAME}-${PKG_VERSION}.tar.bz2 + +include ${TOPDIR}/mk/package.mk + +$(eval $(call PKG_template,ALSA_UTILS,alsa-utils,${PKG_VERSION}-${PKG_RELEASE},${ARCH})) + +CONFIGURE_STYLE= gnu +CONFIGURE_ARGS+= --disable-alsamixer +BUILD_STYLE= auto +INSTALL_STYLE= auto + +post-install: + ${INSTALL_DIR} ${IDIR_ALSA_UTILS}/etc/init.d + ${INSTALL_BIN} ./files/amixer.init ${IDIR_ALSA_UTILS}/etc/init.d/amixer + ${INSTALL_DIR} ${IDIR_ALSA_UTILS}/usr/bin + ${CP} ${WRKINST}/usr/bin/amixer ${IDIR_ALSA_UTILS}/usr/bin/ + +include ${TOPDIR}/mk/pkg-bottom.mk diff --git a/package/alsa-utils/files/amixer.init b/package/alsa-utils/files/amixer.init new file mode 100644 index 000000000..5d5aa6e2b --- /dev/null +++ b/package/alsa-utils/files/amixer.init @@ -0,0 +1,30 @@ +#!/bin/sh +#FWINIT 60 +. /etc/rc.conf + +case $1 in +autostop) ;; +autostart) + test x"${amixer:-NO}" = x"NO" && exit 0 + exec sh $0 start + ;; +start) + amixer set Master on + amixer set PCM on + amixer set Master 75% + amixer set PCM 75% + ;; +stop) + amixer set Master off + amixer set PCM off + ;; +restart) + sh $0 stop + sh $0 start + ;; +*) + echo "Usage: $0 {start | stop | restart}" + exit 1 + ;; +esac +exit $? diff --git a/package/alsa-utils/ipkg/alsa-utils.control b/package/alsa-utils/ipkg/alsa-utils.control new file mode 100644 index 000000000..88e38c96c --- /dev/null +++ b/package/alsa-utils/ipkg/alsa-utils.control @@ -0,0 +1,4 @@ +Package: alsa-utils +Priority: optional +Section: libs +Description: ALSA utilities diff --git a/package/alsa-utils/ipkg/alsa-utils.postinst b/package/alsa-utils/ipkg/alsa-utils.postinst new file mode 100644 index 000000000..f18dbf62a --- /dev/null +++ b/package/alsa-utils/ipkg/alsa-utils.postinst @@ -0,0 +1,4 @@ +#!/bin/sh +. $IPKG_INSTROOT/etc/functions.sh +add_rcconf amixer + diff --git a/package/alsa-utils/patches/patch-alsactl_init_parse_c b/package/alsa-utils/patches/patch-alsactl_init_parse_c new file mode 100644 index 000000000..fca7eedd9 --- /dev/null +++ b/package/alsa-utils/patches/patch-alsactl_init_parse_c @@ -0,0 +1,21 @@ +$Id: update-patches 24 2008-08-31 14:56:13Z wbx $ +--- alsa-utils-1.0.19.orig/alsactl/init_parse.c 2009-01-19 12:17:19.000000000 +0100 ++++ alsa-utils-1.0.19/alsactl/init_parse.c 2009-05-09 04:56:45.000000000 +0200 +@@ -381,7 +381,7 @@ static int set_ctl_value(struct space *s + snd_ctl_elem_value_set_integer(space->ctl_value, idx, val); + } else if (items > 2 && value[items-2] == 'd' && value[items-1] == 'B') { + val = strtol(value, NULL, 0) * 100; +- if ((pos2 = index(value, '.')) != NULL) { ++ if ((pos2 = strchr(value, '.')) != NULL) { + if (isdigit(*(pos2-1)) && isdigit(*(pos2-2))) { + if (val < 0) + val -= strtol(pos2 + 1, NULL, 0); +@@ -1253,7 +1253,7 @@ static char *new_root_dir(const char *fi + + res = strdup(filename); + if (res) { +- tmp = rindex(res, '/'); ++ tmp = strrchr(res, '/'); + if (tmp) + *tmp = '\0'; + } |