Browse Source

Reverted the PulseAudio changes for alsa, added slackpkg blacklist

rocket-config
mid-kid 8 years ago
parent
commit
0ba61e31f9
  1. 10
      doinst.sh
  2. 88
      etc/rc.d/rc.alsa
  3. 87
      etc/rc.d/rc.alsa.orig
  4. 68
      etc/slackpkg/blacklist
  5. 25
      readme.txt
  6. 8
      rocket-config.SlackBuild
  7. 2
      slack-desc

10
doinst.sh

@ -15,3 +15,13 @@ config() {
# Otherwise, we leave the .new copy for the admin to consider...
}
rmconfig() {
CFG="$1"
ORIGMD5="$2"
if [ -r $CFG ] && [ "`cat $CFG | md5sum`" = "$ORIGMD5 -" ]; then
mv $CFG $CFG.orig
fi
}
rmconfig etc/asound.conf 94423887ed53ea0c17db9f9aeb2a40a6

88
etc/rc.d/rc.alsa

@ -0,0 +1,88 @@
#!/bin/sh
# Load the mixer settings and OSS compatibility (if enabled) for ALSA.
# (the Advanced Linux Sound Architecture)
# A function to load the ALSA mixer settings:
load_alsa_mixer() {
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 /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 alsaconf script.
amixer -s -q <<EOF
set Master 75% unmute
set Master -12dB
set 'Master Mono' 75% unmute
set 'Master Mono' -12dB
set Front 75% unmute
set Front -12dB
set PCM 90% unmute
set PCM 0dB
mixer Synth 90% unmute
mixer Synth 0dB
mixer CD 90% unmute
mixer CD 0dB
# mute mic
set Mic 0% mute
# ESS 1969 chipset has 2 PCM channels
set PCM,1 90% unmute
set PCM,1 0dB
# Trident/YMFPCI/emu10k1
set Wave 100% unmute
set Music 100% unmute
set AC97 100% unmute
# CS4237B chipset:
set 'Master Digital' 75% unmute
# Envy24 chips with analog outs
set DAC 90% unmute
set DAC -12dB
set DAC,0 90% unmute
set DAC,0 -12dB
set DAC,1 90% unmute
set DAC,1 -12dB
# some notebooks use headphone instead of master
set Headphone 75% unmute
set Headphone -12dB
set Playback 100% unmute
# turn off digital switches
set "SB Live Analog/Digital Output Jack" off
set "Audigy Analog/Digital Output Jack" off
EOF
echo "Storing default ALSA mixer settings: /usr/sbin/alsactl store"
/usr/sbin/alsactl store
fi
fi
}
# If udev or something else has loaded the ALSA modules, then
# simply load the mixer settings and make sure the OSS compat
# modules are loaded (if enabled):
if [ -d /proc/asound ]; then
if [ -x /etc/rc.d/rc.alsa-oss ]; then
sh /etc/rc.d/rc.alsa-oss
fi
load_alsa_mixer
else
# 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
echo "Loading ALSA kernel modules."
for module in $DRIVERS; do
modprobe $module
done
fi
# If ALSA is now up, then load the mixer settings and OSS modules (if enabled):
if [ -d /proc/asound ]; then
if [ -x /etc/rc.d/rc.alsa-oss ]; then
sh /etc/rc.d/rc.alsa-oss
fi
load_alsa_mixer
fi
fi

87
etc/rc.d/rc.alsa.orig

@ -0,0 +1,87 @@
#!/bin/sh
# Load the mixer settings and OSS compatibility (if enabled) for ALSA.
# (the Advanced Linux Sound Architecture)
# A function to load the ALSA mixer settings:
load_alsa_mixer() {
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 /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 alsaconf script.
amixer -s -q <<EOF
set Master 75% unmute
set Master -12dB
set 'Master Mono' 75% unmute
set 'Master Mono' -12dB
set Front 75% unmute
set Front -12dB
set PCM 90% unmute
set PCM 0dB
mixer Synth 90% unmute
mixer Synth 0dB
mixer CD 90% unmute
mixer CD 0dB
# mute mic
set Mic 0% mute
# ESS 1969 chipset has 2 PCM channels
set PCM,1 90% unmute
set PCM,1 0dB
# Trident/YMFPCI/emu10k1
set Wave 100% unmute
set Music 100% unmute
set AC97 100% unmute
# CS4237B chipset:
set 'Master Digital' 75% unmute
# Envy24 chips with analog outs
set DAC 90% unmute
set DAC -12dB
set DAC,0 90% unmute
set DAC,0 -12dB
set DAC,1 90% unmute
set DAC,1 -12dB
# some notebooks use headphone instead of master
set Headphone 75% unmute
set Headphone -12dB
set Playback 100% unmute
# turn off digital switches
set "SB Live Analog/Digital Output Jack" off
set "Audigy Analog/Digital Output Jack" off
EOF
echo "Storing default ALSA mixer settings: /usr/sbin/alsactl store"
/usr/sbin/alsactl store
fi
fi
}
# If udev or something else has loaded the ALSA modules, then
# simply load the mixer settings and make sure the OSS compat
# modules are loaded (if enabled):
if [ -d /proc/asound ]; then
if [ -x /etc/rc.d/rc.alsa-oss ]; then
sh /etc/rc.d/rc.alsa-oss
fi
load_alsa_mixer
else
# 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
echo "Loading ALSA kernel modules."
for module in $DRIVERS; do
modprobe $module
done
fi
# If ALSA is now up, then load the mixer settings and OSS modules (if enabled):
if [ -d /proc/asound ]; then
if [ -x /etc/rc.d/rc.alsa-oss ]; then
sh /etc/rc.d/rc.alsa-oss
fi
load_alsa_mixer
fi
fi

68
etc/slackpkg/blacklist

@ -0,0 +1,68 @@
# A list of the packages I usually remove from the base install.
# The commented entries differ per installation.
# Entire package groups
#d
e
f
#k
kde
kdei
t
tcl
xfce
y
# a
#glibc-solibs
#openssl-solibs
elvis
#elilo
#lilo
#syslinux
#grub
# ap
pamixer
sox
# d
gcc-go
# l
alsa-plugins
pulseaudio
seamonkey-solibs
# n
ModemManager
NetworkManager
mobile-broadband-provider
# x
ttf-indic-fonts
# xap
MPlayer
network-manager-applet
pavucontrol
seamonkey
rxvt
# --- Rationales:
#
# MPlayer, sox: Need a rebuild to work without PulseAudio, and I don't use them anyway.
# seamonkey, seamonkey-solibs: No particular reason, I just don't use it, and it's big.
# ttf-indic-fonts: Winetricks doesn't like it.
#
# -- Replaced:
# pulseaudio, alsa-plugins, pavucontrol, pamixer: ALSA
# NetworkManager, ModemManager, mobile-broadband-provider, network-manager-applet: dhcpcd/wpa_supplicant
# elvis: vim
# rxvt: rxvt-unicode
# gcc-go: go (They actually conflict)
#
# -- Optional:
# elilo, lilo, syslinux, grub: Uncomment the ones not used.
# k, d: Only needed if you need to compile programs.
# openssl-solibs, glibc-solibs: Useless if d is installed.

25
readme.txt

@ -0,0 +1,25 @@
Notes:
Some config changes are done in patched packages:
- wpa_supplicant
- vim
Changes:
/etc/rc.d/rc.M:
- Added entry for dhcpcd
/etc/rc.d/rc.dhcpcd:
- Just run dhcpcd on boot
/etc/rc.d/rc.alsa:
- Just added a newline at the end to differentiate from the original and set the permissions to 755
/etc/profile:
- Added sbin paths to the PATH for all users
/etc/dhcpcd.conf:
- Removed nohook for wpa_supplicant, to run it on every wireless interface
/etc/slackpkg/blacklist:
- A list of the packages I usually remove from the base install. It's not replaced on install and completely optional.

8
rocket-config.SlackBuild

@ -2,7 +2,7 @@
PKGNAM=rocket-config
VERSION=14.2
BUILD=${BUILD:-2rocket}
BUILD=${BUILD:-3rocket}
ARCH=noarch
CWD=$(pwd)
@ -15,6 +15,9 @@ mkdir -p $PKG/install
cat $CWD/slack-desc > $PKG/install/slack-desc
cat $CWD/doinst.sh > $PKG/install/doinst.sh
mkdir -p $PKG/usr/doc/$PKGNAM-$VERSION
cat $CWD/readme.txt > $PKG/usr/doc/$PKGNAM-$VERSION/readme.txt
find $CWD/etc -type f ! -name '*.orig' -printf '%P\n' | while read config; do
echo Installing /etc/$config
install -Dm644 $CWD/etc/$config $PKG/etc/$config.new
@ -27,8 +30,7 @@ find $CWD/etc -type f ! -name '*.orig' -printf '%P\n' | while read config; do
done
# Set some special permissions
chmod 755 $PKG/etc/rc.d/rc.M.new
chmod 755 $PKG/etc/rc.d/rc.dhcpcd
chmod 755 $PKG/etc/rc.d/rc.*
cd $PKG
/sbin/makepkg -l y -c n $TMP/$PKGNAM-$VERSION-$ARCH-$BUILD.txz

2
slack-desc

@ -16,4 +16,4 @@ rocket-config: and the original will be saved with the .orig extension.
rocket-config: Consider removing the .orig files, or restore them when removing
rocket-config: this package.
rocket-config:
rocket-config:
rocket-config: See /usr/doc for more info.

Loading…
Cancel
Save