From fa7b6692e456d178f87f15a35b48dad2c79bf809 Mon Sep 17 00:00:00 2001 From: Simon Busch Date: Tue, 15 Mar 2011 09:48:24 +0100 Subject: [PATCH] fsoaudiod: several updates to the recipe to be usefull - install daemon initscript - add dependency on alsa-lib - add extra package for daemon config files - add note about deactivate PROVIDER of openmoko-alsa-scenarios and virtual/scenarios - change PV to 0.1.0 and bump PE as version was 0.9.6 before Signed-off-by: Simon Busch --- recipes/freesmartphone/fsoaudiod/fsoaudiod | 40 ++++++++++++++++++++++ recipes/freesmartphone/fsoaudiod_git.bb | 30 ++++++++++++++-- 2 files changed, 67 insertions(+), 3 deletions(-) create mode 100644 recipes/freesmartphone/fsoaudiod/fsoaudiod diff --git a/recipes/freesmartphone/fsoaudiod/fsoaudiod b/recipes/freesmartphone/fsoaudiod/fsoaudiod new file mode 100644 index 0000000000..f79b3f2733 --- /dev/null +++ b/recipes/freesmartphone/fsoaudiod/fsoaudiod @@ -0,0 +1,40 @@ +#! /bin/sh +# +# fsoaudiod -- This shell script starts and stops the FSO2 audio subsystem daemon. +# +# chkconfig: 345 90 30 +# description: fsoaudiod is the freesmartphone.org FSO2 audio daemon +# processname: fsoaudiod + +PATH=/bin:/usr/bin:/sbin:/usr/sbin +NAME=fsoaudiod + +[ -f /etc/default/rcS ] && . /etc/default/rcS + +case "$1" in + start) + echo -n "Starting fsoaudiod: " + start-stop-daemon --start --pidfile /var/run/${NAME}.pid --make-pidfile --background -x /usr/sbin/fsoaudiod + if [ $? = 0 ]; then + echo "(ok)" + else + echo "(failed)" + fi + ;; + stop) + echo -n "Stopping fsoaudiod: " + start-stop-daemon --stop --pidfile /var/run/${NAME}.pid --oknodo + rm -f /var/run/${NAME}.pid + echo "(done)" + ;; + restart|force-reload) + $0 stop + $0 start + ;; + *) + echo "Usage: /etc/init.d/fsoaudiod {start|stop|restart|force-reload}" + exit 1 + ;; +esac + +exit 0 diff --git a/recipes/freesmartphone/fsoaudiod_git.bb b/recipes/freesmartphone/fsoaudiod_git.bb index d6a2adf2a4..bfdfca4cfc 100644 --- a/recipes/freesmartphone/fsoaudiod_git.bb +++ b/recipes/freesmartphone/fsoaudiod_git.bb @@ -1,6 +1,30 @@ require cornucopia.inc inherit fso-plugin + +DEPENDS += "alsa-lib" + +# We need to uncomment the line below after the migration of all scenario files from +# fsodeviced to fsoaudiod is done. Otherwise we will get build errors as both fsodeviced +# and fsoaudiod are dependencies of the FSO framework. +# PROVIDES_${PN} = "openmoko-alsa-scenarios virtual/alsa-scenarios" + SRCREV = "${FSO_CORNUCOPIA_SRCREV}" -PV = "0.9.5+gitr${SRCPV}" -PE = "1" -PR = "${INC_PR}.0" +PV = "0.1.0+gitr${SRCPV}" +PE = "2" +PR = "${INC_PR}.1" + +inherit update-rc.d + +INITSCRIPT_NAME = "fsoaudiod" +INITSCRIPT_PARAMS = "defaults 30" + +SRC_URI += "file://fsoaudiod" + +CONFFILES_${PN} = " \ + ${sysconfdir}/freesmartphone/conf/palm_pre/fsoaudiod.conf \ +" + +do_install_append() { + install -d ${D}${sysconfdir}/init.d/ + install -m 0755 ${WORKDIR}/fsoaudiod ${D}${sysconfdir}/init.d/ +} -- 2.39.5