wok-6.x rev 10774
alsa-utils: fix path and dir for asound.state
author | Christophe Lincoln <pankso@slitaz.org> |
---|---|
date | Tue May 31 23:42:25 2011 +0200 (2011-05-31) |
parents | c2de31b7cf3d |
children | f062bf68feb0 |
files | alsa-utils/receipt |
line diff
1.1 --- a/alsa-utils/receipt Tue May 31 21:28:58 2011 +0100 1.2 +++ b/alsa-utils/receipt Tue May 31 23:42:25 2011 +0200 1.3 @@ -29,10 +29,10 @@ 1.4 # Rules to gen a SliTaz package suitable for Tazpkg. 1.5 genpkg_rules() 1.6 { 1.7 - mkdir -p $fs/usr $fs/etc 1.8 + mkdir -p $fs/usr $fs/var/lib/alsa 1.9 cp -a $_pkg/usr/bin $fs/usr 1.10 cp -a $_pkg/usr/sbin $fs/usr 1.11 - touch $fs/etc/asound.state 1.12 + touch $fs/var/lib/alsa/asound.state 1.13 chmod 755 $fs/usr/sbin/* 1.14 # Remove speaker-test (18 Ko and needs sounds) 1.15 rm $fs/usr/bin/speaker-test 1.16 @@ -42,3 +42,20 @@ 1.17 # Remove alsaconf (use soundconf). 1.18 rm $fs/usr/sbin/alsaconf 1.19 } 1.20 + 1.21 +# Main alsa config (card name, volumes, etc) have moved upstream. So backup 1.22 +# current one and reenable it after package install so user still have ther 1.23 +# sound card and settings working. 1.24 +pre_install() 1.25 +{ 1.26 + if [ -f $1/etc/asound.state ]; then 1.27 + mv $1/etc/asound.state /tmp 1.28 + fi 1.29 +} 1.30 + 1.31 +post_install() 1.32 +{ 1.33 + if [ -f $1/tmp/asound.state ]; then 1.34 + mv $1/tmp/asound.state $1/var/lib/alsa 1.35 + fi 1.36 +}