alsa-utils: switch to systemd, drop openrc support.

This commit is contained in:
Juan RP 2011-10-11 04:55:44 +02:00
parent 787b349bd8
commit e26c9b26fe
2 changed files with 2 additions and 44 deletions

View File

@ -1,33 +0,0 @@
#!/sbin/runscript
alsa_statedir=/var/lib/alsa
depend()
{
need localmount
after bootmisc modules coldplug hotplug
}
start()
{
ebegin "Restoring ALSA mixer settings"
[ ! -r ${alsa_statedir}/asound.state ] && eend 0
cards="$(sed -n -e 's/ *\([[:digit:]]*\) .*/\1/p' /proc/asound/cards)"
for cardnum in ${cards}; do
alsactl -f ${alsa_statedir}/asound.state restore ${cardnum} \
|| ewarn "Errors while restoring defaults, ignoring"
done
eend 0
}
stop()
{
ebegin "Storing ALSA mixer settings"
[ ! -d ${alsa_statedir} ] && mkdir -p ${alsa_statedir}
alsactl -f ${alsa_statedir}/asound.state store
eend $?
}

View File

@ -1,7 +1,7 @@
# Template build file for 'alsa-utils'.
pkgname=alsa-utils
version=1.0.24.2
revision=2
revision=3
distfiles="ftp://ftp.alsa-project.org/pub/utils/$pkgname-$version.tar.bz2"
build_style=gnu_configure
configure_args="--with-systemdsystemunitdir=/lib/systemd/system"
@ -14,10 +14,7 @@ long_desc="
The Advanced Linux Sound Architecture (ALSA) provides audio and MIDI
functionality to the Linux operating system.
This package includes the ALSA runtime utilities
"
openrc_services="alsamixer default true"
This package includes the ALSA runtime utilities."
Add_dependency run alsa-lib
Add_dependency run glibc
@ -27,9 +24,3 @@ Add_dependency build pkg-config
Add_dependency build alsa-lib-devel
Add_dependency build gettext
Add_dependency build xmlto
post_install()
{
# OpenRC service to save/restore mixer settings.
vinstall ${FILESDIR}/alsamixer.rc 755 etc/init.d alsamixer
}