summaryrefslogtreecommitdiffstats
path: root/meta-yocto/recipes-bsp/beagleboard-audio/beagleboard-audio.bb
blob: 0bfd7dc5a25b9af8be3f13fc55cf8d3c49ebd593 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
SUMMARY = "Provide a basic init script to enable audio"
DESCRIPTION = "Set the volume and unmute the Front mixer setting during boot."
SECTION = "base"
LICENSE = "MIT"
LIC_FILES_CHKSUM = "file://${COREBASE}/LICENSE;md5=3f40d7994397109285ec7b81fdeb3b58"

PR = "r5"

inherit update-rc.d

RDEPENDS_${PN} = "alsa-utils-amixer"

SRC_URI = "file://beagleboard-audio"

INITSCRIPT_NAME = "beagleboard-audio"
INITSCRIPT_PARAMS = "defaults 90"

COMPATIBLE_MACHINE = "beagleboard"
INHIBIT_DEFAULT_DEPS = "1"

do_install() {
	install -d ${D}${sysconfdir} \
	           ${D}${sysconfdir}/init.d
	install -m 0755 ${WORKDIR}/beagleboard-audio ${D}${sysconfdir}/init.d
        cat ${WORKDIR}/${INITSCRIPT_NAME} | \
            sed -e 's,/etc,${sysconfdir},g' \
                -e 's,/usr/sbin,${sbindir},g' \
                -e 's,/var,${localstatedir},g' \
                -e 's,/usr/bin,${bindir},g' \
                -e 's,/usr,${prefix},g' > ${D}${sysconfdir}/init.d/${INITSCRIPT_NAME}
        chmod 755 ${D}${sysconfdir}/init.d/${INITSCRIPT_NAME}
}