From 709c4d66e0b107ca606941b988bad717c0b45d9b Mon Sep 17 00:00:00 2001 From: Denys Dmytriyenko Date: Tue, 17 Mar 2009 14:32:59 -0400 Subject: 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 Acked-by: Mike Westerhof Acked-by: Philip Balister Acked-by: Khem Raj Acked-by: Marcin Juszkiewicz Acked-by: Koen Kooi Acked-by: Frans Meulenbroeks --- recipes/alsa/alsa-state.bb | 58 ++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 58 insertions(+) create mode 100644 recipes/alsa/alsa-state.bb (limited to 'recipes/alsa/alsa-state.bb') 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 (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 +} -- cgit 1.2.3-korg