fic-gta0? : renamed fic-gta0? to om-gta0? to reflect true name of device
[vuplus_openembedded] / packages / alsa / alsa-state.bb
1 # Copyright Matthias Hentges <devel@hentges.net> (c) 2007
2 # License: MIT (see http://www.opensource.org/licenses/mit-license.php
3 #               for a copy of the license)
4 #
5 # Filename: alsa-state.bb
6
7 DESCRIPTION = "Default ALSA configuration"
8 LICENSE = "GPL"
9 RRECOMMENDS_alsa-state = "alsa-states"
10 PV = "0.1.0"
11 PR = "r11"
12
13 SRC_URI = " \
14   file://asoundrc \
15   file://asound.state \
16   file://alsa-state "
17
18 SRC_URI_append_om-gta01 = " \
19   file://capturehandset.state \
20   file://captureheadset.state \
21   file://gsmbluetooth.state \
22   file://gsmhandset.state \
23   file://gsmheadset.state \
24   file://gsmspeakerout.state \
25   file://stereoout.state \
26   file://voip-handset.state \
27   file://voip-headset.state"
28
29 SRC_URI_append_om-gta02 = "\
30   file://stereoout.state \
31   file://gsmhandset.state \
32   "
33
34 inherit update-rc.d
35
36 INITSCRIPT_NAME = "alsa-state"
37 INITSCRIPT_PARAMS = "defaults 10"
38
39 do_install() {
40     install -d ${D}${sysconfdir}/init.d
41     install -m 0755 ${WORKDIR}/alsa-state ${D}${sysconfdir}/init.d
42
43         install -m 0644 ${WORKDIR}/asoundrc ${D}${sysconfdir}
44         install -m 0644 ${WORKDIR}/*.state ${D}${sysconfdir}
45 }
46
47 PACKAGES += "alsa-states"
48 FILES_${PN} = "${sysconfdir}/init.d ${sysconfdir}/asoundrc"
49 FILES_alsa-states = "${sysconfdir}/*.state"
50 PACKAGE_ARCH_${PN} = "all"
51 PACKAGE_ARCH_alsa-states = "${MACHINE_ARCH}"
52
53 pkg_postinst_${PN}() {
54         if test -z "$D"
55         then
56                 if test -x /usr/sbin/alsactl
57                 then
58                         /usr/sbin/alsactl -f ${sysconfdir}/asound.state restore
59                 fi
60         fi
61 }
62