diff options
author | Denys Dmytriyenko <denis@denix.org> | 2009-03-17 14:32:59 -0400 |
---|---|---|
committer | Denys Dmytriyenko <denis@denix.org> | 2009-03-17 14:32:59 -0400 |
commit | 709c4d66e0b107ca606941b988bad717c0b45d9b (patch) | |
tree | 37ee08b1eb308f3b2b6426d5793545c38396b838 /recipes/alsa/alsa-state.bb | |
parent | fa6cd5a3b993f16c27de4ff82b42684516d433ba (diff) |
rename packages/ to recipes/ per earlier agreement
See links below for more details:
http://thread.gmane.org/gmane.comp.handhelds.openembedded/21326
http://thread.gmane.org/gmane.comp.handhelds.openembedded/21816
Signed-off-by: Denys Dmytriyenko <denis@denix.org>
Acked-by: Mike Westerhof <mwester@dls.net>
Acked-by: Philip Balister <philip@balister.org>
Acked-by: Khem Raj <raj.khem@gmail.com>
Acked-by: Marcin Juszkiewicz <hrw@openembedded.org>
Acked-by: Koen Kooi <koen@openembedded.org>
Acked-by: Frans Meulenbroeks <fransmeulenbroeks@gmail.com>
Diffstat (limited to 'recipes/alsa/alsa-state.bb')
-rw-r--r-- | recipes/alsa/alsa-state.bb | 58 |
1 files changed, 58 insertions, 0 deletions
diff --git a/recipes/alsa/alsa-state.bb b/recipes/alsa/alsa-state.bb new file mode 100644 index 0000000000..3ebc0d5476 --- /dev/null +++ b/recipes/alsa/alsa-state.bb @@ -0,0 +1,58 @@ +# Copyright Matthias Hentges <devel@hentges.net> (c) 2007 +# License: MIT (see http://www.opensource.org/licenses/mit-license.php +# for a copy of the license) +# +# Filename: alsa-state.bb + +DESCRIPTION = "Alsa Scenario Files" +LICENSE = "MIT" +PV = "0.2.0" +PR = "r3" + +SRC_URI = "\ + file://asound.conf \ + file://asound.state \ + file://alsa-state \ + file://*.state \ +" + +inherit update-rc.d + +INITSCRIPT_NAME = "alsa-state" +INITSCRIPT_PARAMS = "start 39 S ." + +do_install() { + install -d ${D}${sysconfdir}/init.d + install -m 0755 ${WORKDIR}/alsa-state ${D}${sysconfdir}/init.d + + install -m 0644 ${WORKDIR}/asound.conf ${D}${sysconfdir} + install -m 0644 ${WORKDIR}/*.state ${D}${sysconfdir} +} + +PACKAGES += "alsa-states" + +RRECOMMENDS_alsa-state = "alsa-states" +RRECOMMENDS_${PN}_om-gta01 = "openmoko-alsa-scenarios" +RRECOMMENDS_${PN}_om-gta02 = "openmoko-alsa-scenarios" + +FILES_${PN} = "${sysconfdir}/init.d ${sysconfdir}/asound.conf" +CONFFILES_${PN} = "${sysconfdir}/asound.conf" + +FILES_alsa-states = "${sysconfdir}/*.state" + +PACKAGE_ARCH_${PN} = "all" +PACKAGE_ARCH_alsa-states = "${MACHINE_ARCH}" + +pkg_postinst_${PN}() { + if test -z "$D" + then + if test -x /usr/sbin/alsactl + then + /usr/sbin/alsactl -f ${sysconfdir}/asound.state restore + fi + # INITSCRIPT_PARAMS changed, so remove the old and + # install the new setting. + update-rc.d -f ${INITSCRIPT_NAME} remove + update-rc.d ${INITSCRIPT_NAME} ${INITSCRIPT_PARAMS} + fi +} |