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
)
5 # Filename
: alsa
-state.bb
7 DESCRIPTION
= "Alsa Scenario Files"
18 SRC_URI_append_a780
= "file://gsmhandset.state \
19 file://gsmheadset.state \
20 file://stereoout.state"
24 INITSCRIPT_NAME
= "alsa-state"
25 INITSCRIPT_PARAMS
= "start 39 S . stop 31 0 6 ."
28 install
-d $
{D
}$
{sysconfdir
}/init.d
29 install
-m
0755 $
{WORKDIR
}/alsa
-state $
{D
}$
{sysconfdir
}/init.d
31 install
-m
0644 $
{WORKDIR
}/asound.conf $
{D
}$
{sysconfdir
}
32 install
-m
0644 $
{WORKDIR
}/*.state $
{D
}$
{sysconfdir
}
35 PACKAGES
+= "alsa-states"
37 RRECOMMENDS_alsa
-state
= "alsa-states"
38 RRECOMMENDS_$
{PN
}_append_shr_om
-gta01
= "virtual/alsa-scenarios"
39 RRECOMMENDS_$
{PN
}_append_shr_om
-gta02
= "virtual/alsa-scenarios"
41 FILES_$
{PN
} = "${sysconfdir}/init.d ${sysconfdir}/asound.conf"
42 CONFFILES_$
{PN
} = "${sysconfdir}/asound.conf"
44 FILES_alsa
-states
= "${sysconfdir}/*.state"
47 PACKAGE_ARCH_alsa
-states
= "${MACHINE_ARCH}"
49 pkg_postinst_$
{PN
}() {
52 if test
-x
/usr
/sbin
/alsactl
54 /usr
/sbin
/alsactl
-f $
{sysconfdir
}/asound.state
restore
56 # INITSCRIPT_PARAMS changed
, so remove the old
and
57 # install the
new setting.
58 update
-rc.d
-f $
{INITSCRIPT_NAME
} remove
59 update
-rc.d $
{INITSCRIPT_NAME
} $
{INITSCRIPT_PARAMS
}