From: David-John Willis Date: Wed, 30 Dec 2009 12:09:13 +0000 (+0000) Subject: pandora-libpnd: Bump SRCREV to include the keymapper daemon and start to rejig init... X-Git-Tag: Release-2010-05/1~128 X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=a8c204007762726aca1777576266d9e56882d374;p=openpandora.oe.git pandora-libpnd: Bump SRCREV to include the keymapper daemon and start to rejig init scripts (WIP). --- diff --git a/recipes/pandora-system/pandora-libpnd.bb b/recipes/pandora-system/pandora-libpnd.bb index 6d5cba0..ac14d07 100755 --- a/recipes/pandora-system/pandora-libpnd.bb +++ b/recipes/pandora-system/pandora-libpnd.bb @@ -1,16 +1,18 @@ DESCRIPTION = "Support for the PND format in Pandora images (lib, daemon, init script etc.)" LICENSE = "lGPL" -PR = "r1" +PR = "r15" PARALLEL_MAKE = "" SRC_URI = " \ git://openpandora.org/pandora-libraries.git;protocol=git;branch=master \ - file://rc.libpnd \ + file://rc.pndnotifyd \ + file://rc.pndevmapperd \ + file://op_pnd_run.desktop \ " -SRCREV = "fd9090900d653b51b1d7b335b1224c3b65353773" +SRCREV = "c92806d9595975c5111630f52eaa7ce2b83880a9" S = "${WORKDIR}/git" @@ -19,8 +21,8 @@ inherit update-rc.d TARGET_CC_ARCH += "${LDFLAGS}" TARGET_CFLAGS += "-Wall -I./include" -INITSCRIPT_NAME = "libpnd-init" -INITSCRIPT_PARAMS = "start 30 5 2 . stop 40 0 1 6 ." +INITSCRIPT_NAME = "pndnotifyd-init" +INITSCRIPT_PARAMS = "start 30 5 3 . stop 40 0 1 6 ." do_compile_prepend() { cd ${S}/ @@ -36,12 +38,15 @@ do_install() { install ${S}/deployment/etc/pandora/conf/apps ${D}${sysconfdir}/pandora/conf/apps install ${S}/deployment/etc/pandora/conf/desktop ${D}${sysconfdir}/pandora/conf/desktop install ${S}/deployment/etc/pandora/conf/categories ${D}${sysconfdir}/pandora/conf/categories + install ${S}/deployment/etc/pandora/conf/eventmap ${D}${sysconfdir}/pandora/conf/eventmap install -d ${D}${libdir}/ cp -pP ${S}/deployment/usr/lib/libpnd* ${D}${libdir}/ cp -pP ${S}/deployment/usr/lib/libpnd.so.1.0.1 ${D}${libdir}/libpnd.so.1 install -d ${D}${bindir}/ - cp -pP ${S}/deployment/usr/bin/pndnotifyd ${D}${bindir}/pndnotifyd + install -m 0755 ${S}/deployment/usr/bin/pndnotifyd ${D}${bindir}/pndnotifyd + install -m 0755 ${S}/deployment/usr/bin/pndevmapperd ${D}${bindir}/pndevmapperd + install -m 0755 ${S}/deployment/usr/bin/pndevmapperd ${D}${bindir}/pnd_run install -d ${D}${prefix}/pandora/ install -d ${D}${prefix}/pandora/apps/ @@ -49,10 +54,20 @@ do_install() { cp -pP ${S}/deployment/usr/pandora/scripts/* ${D}${prefix}/pandora/scripts install -d ${D}${sysconfdir}/init.d/ - install -m 0755 ${WORKDIR}/rc.libpnd ${D}${sysconfdir}/init.d/libpnd-init + install -m 0755 ${WORKDIR}/rc.pndnotifyd ${D}${sysconfdir}/init.d/pndnotifyd-init + install -m 0755 ${WORKDIR}/rc.pndevmapperd ${D}${sysconfdir}/init.d/pndevmapperd-init install -d ${D}${prefix}/local/share/applications/ + + install -d ${D}${includedir}/ + install -m 0644 ${S}/include/pnd* ${D}${includedir}/ + + install -d ${D}${sysconfdir}/sudoers.d/ + install -m 440 ${S}/testdata/sh/sudoers ${D}${sysconfdir}/sudoers.d/01_libpnd + + install -d ${D}${datadir}/applications/ + install -m 0644 ${WORKDIR}/op_pnd_run.desktop ${D}${datadir}/applications/ } FILES_${PN} += "${bindir} ${sbindir} ${prefix}/pandora/*" -FILES_${PN}-dev += "${libdir}/libpnd.a" +FILES_${PN}-dev += "${libdir}/libpnd.a ${includedir}/pnd*" diff --git a/recipes/pandora-system/pandora-libpnd/op_pnd_run.desktop b/recipes/pandora-system/pandora-libpnd/op_pnd_run.desktop new file mode 100644 index 0000000..164f84f --- /dev/null +++ b/recipes/pandora-system/pandora-libpnd/op_pnd_run.desktop @@ -0,0 +1,9 @@ +[Desktop Entry] +Name=Run PND Application +Comment=Start a PND application. +StartupNotify=false +Exec=pnd_run %F +Icon=Terminal +Terminal=false +Type=Application +Categories=System; diff --git a/recipes/pandora-system/pandora-libpnd/rc.pndevmapperd b/recipes/pandora-system/pandora-libpnd/rc.pndevmapperd new file mode 100644 index 0000000..e857ff2 --- /dev/null +++ b/recipes/pandora-system/pandora-libpnd/rc.pndevmapperd @@ -0,0 +1,73 @@ +#!/bin/sh + +### BEGIN INIT INFO +# Provides: pndevmapperd +# Required-Start: udev +# Required-Stop: #adjust +# Default-Start: 2 3 4 5 +# Default-Stop: 0 1 6 +### END INIT INFO + +PID=`pidof -o %PPID -x pndevmapperd` +PNDEVMAPPER='/usr/bin/pndevmapperd' #adjust + +DESC="Pandora PND Event Deamon" +NAME="pndevmapperd" + +d_stop() { + if [ $PID ] + then + kill $PID + else + echo "$DESC: $NAME not running." + fi +} + +d_start() { + if [ $PID ] + then + echo "$DESC: $NAME already running." + else + $PNDEVMAPPER -d + fi +} + +d_reload() { + if [ $PID ] + then + kill -HUP $PID + else + echo "$DESC: $NAME not running." + fi +} + +case "$1" in + start) + echo -n "Starting $DESC: $NAME" + d_start + echo "." + ;; + stop) + echo -n "Stopping $DESC: $NAME" + d_stop + echo "." + ;; + reload) + echo -n "Reloading $DESC: $NAME" + d_reload + echo "." + ;; + restart|force-reload) + echo -n "Restarting $DESC: $NAME" + d_stop + sleep 1 + d_start + echo "." + ;; + *) + echo "Usage: $0 {start|stop|restart|reload|force-reload}" >&2 + exit 1 + ;; +esac + +exit 0 diff --git a/recipes/pandora-system/pandora-libpnd/rc.libpnd b/recipes/pandora-system/pandora-libpnd/rc.pndnotifyd old mode 100755 new mode 100644 similarity index 97% rename from recipes/pandora-system/pandora-libpnd/rc.libpnd rename to recipes/pandora-system/pandora-libpnd/rc.pndnotifyd index e6e2936..3dff46f --- a/recipes/pandora-system/pandora-libpnd/rc.libpnd +++ b/recipes/pandora-system/pandora-libpnd/rc.pndnotifyd @@ -2,7 +2,7 @@ ### BEGIN INIT INFO # Provides: pndnotifyd -# Required-Start: #adjust +# Required-Start: udev # Required-Stop: #adjust # Default-Start: 2 3 4 5 # Default-Stop: 0 1 6