# HG changeset patch # User Christophe Lincoln # Date 1306878145 -7200 # Node ID e2cf25cb008759443d57d71f752f8a1ee724e29b # Parent c2de31b7cf3d85318e7674a21aef24a196925f56 alsa-utils: fix path and dir for asound.state diff -r c2de31b7cf3d -r e2cf25cb0087 alsa-utils/receipt --- a/alsa-utils/receipt Tue May 31 21:28:58 2011 +0100 +++ b/alsa-utils/receipt Tue May 31 23:42:25 2011 +0200 @@ -29,10 +29,10 @@ # Rules to gen a SliTaz package suitable for Tazpkg. genpkg_rules() { - mkdir -p $fs/usr $fs/etc + mkdir -p $fs/usr $fs/var/lib/alsa cp -a $_pkg/usr/bin $fs/usr cp -a $_pkg/usr/sbin $fs/usr - touch $fs/etc/asound.state + touch $fs/var/lib/alsa/asound.state chmod 755 $fs/usr/sbin/* # Remove speaker-test (18 Ko and needs sounds) rm $fs/usr/bin/speaker-test @@ -42,3 +42,20 @@ # Remove alsaconf (use soundconf). rm $fs/usr/sbin/alsaconf } + +# Main alsa config (card name, volumes, etc) have moved upstream. So backup +# current one and reenable it after package install so user still have ther +# sound card and settings working. +pre_install() +{ + if [ -f $1/etc/asound.state ]; then + mv $1/etc/asound.state /tmp + fi +} + +post_install() +{ + if [ -f $1/tmp/asound.state ]; then + mv $1/tmp/asound.state $1/var/lib/alsa + fi +}