diff options
Diffstat (limited to 'meta/recipes-bsp/alsa-state')
-rw-r--r-- | meta/recipes-bsp/alsa-state/alsa-state.bb | 31 | ||||
-rwxr-xr-x | meta/recipes-bsp/alsa-state/alsa-state/alsa-state-init | 3 |
2 files changed, 18 insertions, 16 deletions
diff --git a/meta/recipes-bsp/alsa-state/alsa-state.bb b/meta/recipes-bsp/alsa-state/alsa-state.bb index cec2272c80..099fbd3b9d 100644 --- a/meta/recipes-bsp/alsa-state/alsa-state.bb +++ b/meta/recipes-bsp/alsa-state/alsa-state.bb | |||
@@ -8,10 +8,12 @@ SUMMARY = "Alsa scenario files to enable alsa state restoration" | |||
8 | HOMEPAGE = "http://www.alsa-project.org/" | 8 | HOMEPAGE = "http://www.alsa-project.org/" |
9 | DESCRIPTION = "Alsa Scenario Files - an init script and state files to restore \ | 9 | DESCRIPTION = "Alsa Scenario Files - an init script and state files to restore \ |
10 | sound state at system boot and save it at system shut down." | 10 | sound state at system boot and save it at system shut down." |
11 | LICENSE = "MIT" | 11 | LICENSE = "MIT & GPL-2.0-or-later" |
12 | LIC_FILES_CHKSUM = "file://${COREBASE}/meta/COPYING.MIT;md5=3da9cfbcb788c80a0384361b4de20420" | 12 | LIC_FILES_CHKSUM = " \ |
13 | file://${COREBASE}/meta/COPYING.MIT;md5=3da9cfbcb788c80a0384361b4de20420 \ | ||
14 | file://alsa-state-init;beginline=3;endline=4;md5=3ff7ecbf534d7d503941abe8e268ef50 \ | ||
15 | " | ||
13 | PV = "0.2.0" | 16 | PV = "0.2.0" |
14 | PR = "r5" | ||
15 | 17 | ||
16 | SRC_URI = "\ | 18 | SRC_URI = "\ |
17 | file://asound.conf \ | 19 | file://asound.conf \ |
@@ -19,7 +21,8 @@ SRC_URI = "\ | |||
19 | file://alsa-state-init \ | 21 | file://alsa-state-init \ |
20 | " | 22 | " |
21 | 23 | ||
22 | S = "${WORKDIR}" | 24 | S = "${WORKDIR}/sources" |
25 | UNPACKDIR = "${S}" | ||
23 | 26 | ||
24 | # As the recipe doesn't inherit systemd.bbclass, we need to set this variable | 27 | # As the recipe doesn't inherit systemd.bbclass, we need to set this variable |
25 | # manually to avoid unnecessary postinst/preinst generated. | 28 | # manually to avoid unnecessary postinst/preinst generated. |
@@ -36,28 +39,28 @@ INITSCRIPT_PARAMS = "start 39 S . stop 31 0 6 ." | |||
36 | do_install() { | 39 | do_install() { |
37 | # Only install the init script when 'sysvinit' is in DISTRO_FEATURES. | 40 | # Only install the init script when 'sysvinit' is in DISTRO_FEATURES. |
38 | if ${@bb.utils.contains('DISTRO_FEATURES','sysvinit','true','false',d)}; then | 41 | if ${@bb.utils.contains('DISTRO_FEATURES','sysvinit','true','false',d)}; then |
39 | sed -i -e "s:#STATEDIR#:${localstatedir}/lib/alsa:g" ${WORKDIR}/alsa-state-init | 42 | sed -i -e "s:#STATEDIR#:${localstatedir}/lib/alsa:g" ${S}/alsa-state-init |
40 | install -d ${D}${sysconfdir}/init.d | 43 | install -d ${D}${sysconfdir}/init.d |
41 | install -m 0755 ${WORKDIR}/alsa-state-init ${D}${sysconfdir}/init.d/alsa-state | 44 | install -m 0755 ${S}/alsa-state-init ${D}${sysconfdir}/init.d/alsa-state |
42 | fi | 45 | fi |
43 | 46 | ||
44 | install -d ${D}/${localstatedir}/lib/alsa | 47 | install -d ${D}/${localstatedir}/lib/alsa |
45 | install -d ${D}${sysconfdir} | 48 | install -d ${D}${sysconfdir} |
46 | install -m 0644 ${WORKDIR}/asound.conf ${D}${sysconfdir} | 49 | install -m 0644 ${S}/asound.conf ${D}${sysconfdir} |
47 | install -m 0644 ${WORKDIR}/*.state ${D}${localstatedir}/lib/alsa | 50 | install -m 0644 ${S}/*.state ${D}${localstatedir}/lib/alsa |
48 | } | 51 | } |
49 | 52 | ||
50 | PACKAGES += "alsa-states" | 53 | PACKAGES += "alsa-states" |
51 | 54 | ||
52 | RRECOMMENDS_alsa-state = "alsa-states" | 55 | RRECOMMENDS:alsa-state = "alsa-states" |
53 | 56 | ||
54 | RDEPENDS_${PN} = "alsa-utils-alsactl" | 57 | RDEPENDS:${PN} = "alsa-utils-alsactl" |
55 | FILES_${PN} = "${sysconfdir}/init.d ${sysconfdir}/asound.conf" | 58 | FILES:${PN} = "${sysconfdir}/init.d ${sysconfdir}/asound.conf" |
56 | CONFFILES_${PN} = "${sysconfdir}/asound.conf" | 59 | CONFFILES:${PN} = "${sysconfdir}/asound.conf" |
57 | 60 | ||
58 | FILES_alsa-states = "${localstatedir}/lib/alsa/*.state" | 61 | FILES:alsa-states = "${localstatedir}/lib/alsa/*.state" |
59 | 62 | ||
60 | pkg_postinst_${PN}() { | 63 | pkg_postinst:${PN}() { |
61 | if test -z "$D" | 64 | if test -z "$D" |
62 | then | 65 | then |
63 | if test -x ${sbindir}/alsactl | 66 | if test -x ${sbindir}/alsactl |
diff --git a/meta/recipes-bsp/alsa-state/alsa-state/alsa-state-init b/meta/recipes-bsp/alsa-state/alsa-state/alsa-state-init index eee59cb321..a04cc27004 100755 --- a/meta/recipes-bsp/alsa-state/alsa-state/alsa-state-init +++ b/meta/recipes-bsp/alsa-state/alsa-state/alsa-state-init | |||
@@ -1,10 +1,9 @@ | |||
1 | #! /bin/sh | 1 | #! /bin/sh |
2 | # | 2 | # |
3 | # Copyright Matthias Hentges <devel@hentges.net> (c) 2007 | 3 | # Copyright Matthias Hentges <devel@hentges.net> (c) 2007 |
4 | # License: GPL (see http://www.gnu.org/licenses/gpl.txt for a copy of the license) | 4 | # SPDX-License-Identifier: GPL-2.0-or-later |
5 | # | 5 | # |
6 | # Filename: alsa-state | 6 | # Filename: alsa-state |
7 | # Date: 20070308 (YMD) | ||
8 | 7 | ||
9 | # source function library | 8 | # source function library |
10 | . /etc/init.d/functions | 9 | . /etc/init.d/functions |