summaryrefslogtreecommitdiffstats
path: root/meta/recipes-bsp/alsa-state
diff options
context:
space:
mode:
Diffstat (limited to 'meta/recipes-bsp/alsa-state')
-rw-r--r--meta/recipes-bsp/alsa-state/alsa-state.bb31
-rwxr-xr-xmeta/recipes-bsp/alsa-state/alsa-state/alsa-state-init3
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"
8HOMEPAGE = "http://www.alsa-project.org/" 8HOMEPAGE = "http://www.alsa-project.org/"
9DESCRIPTION = "Alsa Scenario Files - an init script and state files to restore \ 9DESCRIPTION = "Alsa Scenario Files - an init script and state files to restore \
10sound state at system boot and save it at system shut down." 10sound state at system boot and save it at system shut down."
11LICENSE = "MIT" 11LICENSE = "MIT & GPL-2.0-or-later"
12LIC_FILES_CHKSUM = "file://${COREBASE}/meta/COPYING.MIT;md5=3da9cfbcb788c80a0384361b4de20420" 12LIC_FILES_CHKSUM = " \
13 file://${COREBASE}/meta/COPYING.MIT;md5=3da9cfbcb788c80a0384361b4de20420 \
14 file://alsa-state-init;beginline=3;endline=4;md5=3ff7ecbf534d7d503941abe8e268ef50 \
15"
13PV = "0.2.0" 16PV = "0.2.0"
14PR = "r5"
15 17
16SRC_URI = "\ 18SRC_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
22S = "${WORKDIR}" 24S = "${WORKDIR}/sources"
25UNPACKDIR = "${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 ."
36do_install() { 39do_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
50PACKAGES += "alsa-states" 53PACKAGES += "alsa-states"
51 54
52RRECOMMENDS_alsa-state = "alsa-states" 55RRECOMMENDS:alsa-state = "alsa-states"
53 56
54RDEPENDS_${PN} = "alsa-utils-alsactl" 57RDEPENDS:${PN} = "alsa-utils-alsactl"
55FILES_${PN} = "${sysconfdir}/init.d ${sysconfdir}/asound.conf" 58FILES:${PN} = "${sysconfdir}/init.d ${sysconfdir}/asound.conf"
56CONFFILES_${PN} = "${sysconfdir}/asound.conf" 59CONFFILES:${PN} = "${sysconfdir}/asound.conf"
57 60
58FILES_alsa-states = "${localstatedir}/lib/alsa/*.state" 61FILES:alsa-states = "${localstatedir}/lib/alsa/*.state"
59 62
60pkg_postinst_${PN}() { 63pkg_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