summaryrefslogtreecommitdiff
path: root/source/ap/alsa-utils
diff options
context:
space:
mode:
Diffstat (limited to 'source/ap/alsa-utils')
-rwxr-xr-xsource/ap/alsa-utils/alsa-utils.SlackBuild6
-rw-r--r--source/ap/alsa-utils/alsa-utils.alsaconf.diff55
-rw-r--r--source/ap/alsa-utils/doinst.sh6
-rw-r--r--source/ap/alsa-utils/rc.alsa20
4 files changed, 50 insertions, 37 deletions
diff --git a/source/ap/alsa-utils/alsa-utils.SlackBuild b/source/ap/alsa-utils/alsa-utils.SlackBuild
index 14398aab..77664487 100755
--- a/source/ap/alsa-utils/alsa-utils.SlackBuild
+++ b/source/ap/alsa-utils/alsa-utils.SlackBuild
@@ -1,6 +1,6 @@
#!/bin/sh
-# Copyright 2008, 2009, 2010 Patrick J. Volkerding, Sebeka, MN, USA
+# Copyright 2008, 2009, 2010, 2011 Patrick J. Volkerding, Sebeka, MN, USA
# All rights reserved.
#
# Redistribution and use of this script, with or without modification, is
@@ -82,9 +82,10 @@ CFLAGS="$SLKCFLAGS" \
make $NUMJOBS || make || exit 1
make install DESTDIR=$PKG
+
mkdir -p $PKG/etc/rc.d
zcat $CWD/rc.alsa.gz > $PKG/etc/rc.d/rc.alsa
-chmod 755 $PKG/etc/rc.d/rc.alsa
+chmod 0755 $PKG/etc/rc.d/rc.alsa
find $PKG | xargs file | grep -e "executable" -e "shared object" \
| grep ELF | cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null
@@ -122,6 +123,7 @@ fi
mkdir -p $PKG/install
cat $CWD/slack-desc > $PKG/install/slack-desc
+zcat $CWD/doinst.sh.gz > $PKG/install/doinst.sh
cd $PKG
/sbin/makepkg -l y -c n $TMP/alsa-utils-$VERSION-$ARCH-$BUILD.txz
diff --git a/source/ap/alsa-utils/alsa-utils.alsaconf.diff b/source/ap/alsa-utils/alsa-utils.alsaconf.diff
index 92e05b83..43aab43b 100644
--- a/source/ap/alsa-utils/alsa-utils.alsaconf.diff
+++ b/source/ap/alsa-utils/alsa-utils.alsaconf.diff
@@ -1,6 +1,32 @@
-diff -Nur alsa-utils-1.0.21.orig/alsaconf/alsaconf.8 alsa-utils-1.0.21/alsaconf/alsaconf.8
---- alsa-utils-1.0.21.orig/alsaconf/alsaconf.8 2009-08-31 10:13:36.000000000 -0500
-+++ alsa-utils-1.0.21/alsaconf/alsaconf.8 2009-11-11 23:45:11.943377777 -0600
+--- ./alsaconf/alsaconf.in.orig 2010-04-16 06:11:06.000000000 -0500
++++ ./alsaconf/alsaconf.in 2010-05-29 21:08:39.000000000 -0500
+@@ -50,7 +50,9 @@
+ }
+
+ # Check for GNU/Linux distributions
+-if [ -f /etc/SuSE-release ]; then
++if [ -f /etc/slackware-version ]; then
++ distribution="slackware"
++elif [ -f /etc/SuSE-release ]; then
+ distribution="suse"
+ suse_version=$(grep 'VERSION = ' /etc/SuSE-release | sed -e s/'VERSION = '//)
+ elif [ -f /etc/UnitedLinux-release ]; then
+@@ -302,10 +304,12 @@
+ else
+ if [ "$distribution" = "gentoo" ]; then
+ cfgfile="/etc/modules.d/alsa"
++elif [ "$distribution" = "slackware" ]; then
++ cfgfile="/etc/modprobe.d/sound.conf"
+ elif [ "$kernel" = "new" ]; then
+ cfgfile="/etc/modprobe.conf"
+ if [ -d /etc/modprobe.d ]; then
+- cfgout="/etc/modprobe.d/50-sound.conf"
++ cfgout="/etc/modprobe.d/sound.conf"
+ cfgoldout="/etc/modprobe.d/sound"
+ if [ ! -f $cfgout ]; then
+ modver=$(modprobe -V | sed -e's/^module-init-tools version //')
+--- ./alsaconf/alsaconf.8.orig 2010-04-16 06:11:06.000000000 -0500
++++ ./alsaconf/alsaconf.8 2010-05-29 21:07:51.000000000 -0500
@@ -16,8 +16,6 @@
This manual page documents briefly the
.B alsaconf
@@ -31,26 +57,3 @@ diff -Nur alsa-utils-1.0.21.orig/alsaconf/alsaconf.8 alsa-utils-1.0.21/alsaconf/
-This manual page was written by Jordi Mallach <jordi@debian.org>,
-for the Debian system (but may be used by others).
+This manual page was written by Jordi Mallach <jordi@debian.org>.
-diff -Nur alsa-utils-1.0.21.orig/alsaconf/alsaconf.in alsa-utils-1.0.21/alsaconf/alsaconf.in
---- alsa-utils-1.0.21.orig/alsaconf/alsaconf.in 2009-08-31 10:13:36.000000000 -0500
-+++ alsa-utils-1.0.21/alsaconf/alsaconf.in 2009-11-11 23:44:21.081360666 -0600
-@@ -50,7 +50,9 @@
- }
-
- # Check for GNU/Linux distributions
--if [ -f /etc/SuSE-release ]; then
-+if [ -f /etc/slackware-version ]; then
-+ distribution="slackware"
-+elif [ -f /etc/SuSE-release ]; then
- distribution="suse"
- suse_version=$(grep 'VERSION = ' /etc/SuSE-release | sed -e s/'VERSION = '//)
- elif [ -f /etc/UnitedLinux-release ]; then
-@@ -305,7 +307,7 @@
- elif [ "$kernel" = "new" ]; then
- cfgfile="/etc/modprobe.conf"
- if [ -d /etc/modprobe.d ]; then
-- cfgout="/etc/modprobe.d/50-sound.conf"
-+ cfgout="/etc/modprobe.d/sound.conf"
- cfgoldout="/etc/modprobe.d/sound"
- if [ ! -f $cfgout ]; then
- modver=$(modprobe -V | sed -e's/^module-init-tools version //')
diff --git a/source/ap/alsa-utils/doinst.sh b/source/ap/alsa-utils/doinst.sh
new file mode 100644
index 00000000..0ee74150
--- /dev/null
+++ b/source/ap/alsa-utils/doinst.sh
@@ -0,0 +1,6 @@
+if [ -r etc/asound.state -a ! -r var/lib/alsa/asound.state -a ! -L etc/asound.state ]; then
+ mv etc/asound.state var/lib/alsa
+fi
+# Better a dangling symlink than for nobody to know where this went:
+rm -f etc/asound.state
+( cd etc && ln -sf ../var/lib/alsa/asound.state . )
diff --git a/source/ap/alsa-utils/rc.alsa b/source/ap/alsa-utils/rc.alsa
index 9e3cae30..2a984a51 100644
--- a/source/ap/alsa-utils/rc.alsa
+++ b/source/ap/alsa-utils/rc.alsa
@@ -4,13 +4,13 @@
# A function to load the ALSA mixer settings:
load_alsa_mixer() {
- if [ -r /etc/asound.state ]; then
+ if [ -r /var/lib/alsa/asound.state ]; then
echo "Loading ALSA mixer settings: /usr/sbin/alsactl restore"
/usr/sbin/alsactl restore
else
# It's possible a user might not want to set a default sound state.
- # In that case, do this: touch /etc/no.asound.state
- if [ ! -r /etc/no.asound.state ]; then
+ # In that case, do this: touch /var/lib/alsa/no.asound.state
+ if [ ! -r /var/lib/alsa/no.asound.state ]; then
echo "Setting default ALSA mixer settings."
# set default mixer volumes for ALSA
# Taken from the alsaconfig script.
@@ -61,11 +61,13 @@ EOF
# A function to load the ALSA OSS compat modules:
load_alsa_oss_modules() {
- if ! cat /proc/modules | tr _ - | grep -wq snd-pcm-oss ; then
- echo "Loading OSS compatibility modules for ALSA."
- modprobe snd-pcm-oss
- modprobe snd-seq-oss
- modprobe snd-mixer-oss
+ if modprobe -c | tr _ - | grep -wq snd-pcm-oss ; then
+ if ! cat /proc/modules | tr _ - | grep -wq snd-pcm-oss ; then
+ echo "Loading OSS compatibility modules for ALSA."
+ modprobe snd-pcm-oss
+ modprobe snd-seq-oss
+ modprobe snd-mixer-oss
+ fi
fi
}
@@ -76,7 +78,7 @@ if [ -d /proc/asound ]; then
load_alsa_oss_modules
load_alsa_mixer
else
- # If there are ALSA modules defined in /etc/modprobe.conf, but
+ # If there are ALSA modules defined in /etc/modprobe.d/*, but
# ALSA is not yet loaded, then load the modules now:
DRIVERS=$(modprobe -c | grep -E "^[[:space:]]*alias[[:space:]]+snd-card-[[:digit:]]" | tr -s "[[:blank:]]" " " | cut -d " " -f 3)
if [ ! "$DRIVERS" = "" ]; then