py-odeviced: add start script, configuration, update
authorMichael Lauer <mickey@vanille-media.de>
Sat, 12 Apr 2008 22:19:08 +0000 (22:19 +0000)
committerMichael Lauer <mickey@vanille-media.de>
Sat, 12 Apr 2008 22:19:08 +0000 (22:19 +0000)
conf/distro/include/sane-srcrevs.inc
packages/freesmartphone/py-odeviced/.mtn2git_empty [new file with mode: 0644]
packages/freesmartphone/py-odeviced/odeviced [new file with mode: 0644]
packages/freesmartphone/py-odeviced/odeviced.conf [new file with mode: 0644]
packages/freesmartphone/py-odeviced/om-gta02/.mtn2git_empty [new file with mode: 0644]
packages/freesmartphone/py-odeviced/om-gta02/odeviced.conf [new file with mode: 0644]
packages/freesmartphone/py-odeviced_svn.bb

index 0e5aa1c..1fc7bb0 100644 (file)
@@ -142,7 +142,7 @@ SRCREV_pn-opkg-native ?= "4235"
 SRCREV_pn-opkg-sdk ?= "4235"
 SRCREV_pn-oprofileui ?= "160"
 SRCREV_pn-psplash ?= "249"
-SRCREV_pn-py-odeviced = "161"
+SRCREV_pn-py-odeviced ?= "190"
 SRCREV_pn-pylgrim ?= "20"
 SRCREV_pn-pyneod ?= "88"
 SRCREV_pn-pyneog ?= "88"
diff --git a/packages/freesmartphone/py-odeviced/.mtn2git_empty b/packages/freesmartphone/py-odeviced/.mtn2git_empty
new file mode 100644 (file)
index 0000000..e69de29
diff --git a/packages/freesmartphone/py-odeviced/odeviced b/packages/freesmartphone/py-odeviced/odeviced
new file mode 100644 (file)
index 0000000..52d3a1d
--- /dev/null
@@ -0,0 +1,40 @@
+#! /bin/sh
+#
+# odeviced  This shell script starts and stops the open device daemon.
+#
+# chkconfig: 345 90 20
+# description: py-odeviced is the open device daemon
+# processname: python
+
+PATH=/bin:/usr/bin:/sbin:/usr/sbin
+NAME=odeviced
+
+[ -f /etc/default/rcS ] && . /etc/default/rcS
+
+case "$1" in
+    start)
+        echo -n "Starting open device daemon: "
+        start-stop-daemon --start --pidfile /var/run/${NAME}.pid --make-pidfile --background -x /usr/bin/odeviced
+        if [ $? = 0 ]; then
+            echo "(ok)"
+        else
+            echo "(failed)"
+        fi
+        ;;
+    stop)
+        echo -n "Stopping open device daemon: "
+        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/odeviced {start|stop|restart|force-reload}"
+        exit 1
+        ;;
+esac
+
+exit 0
diff --git a/packages/freesmartphone/py-odeviced/odeviced.conf b/packages/freesmartphone/py-odeviced/odeviced.conf
new file mode 100644 (file)
index 0000000..e69de29
diff --git a/packages/freesmartphone/py-odeviced/om-gta02/.mtn2git_empty b/packages/freesmartphone/py-odeviced/om-gta02/.mtn2git_empty
new file mode 100644 (file)
index 0000000..e69de29
diff --git a/packages/freesmartphone/py-odeviced/om-gta02/odeviced.conf b/packages/freesmartphone/py-odeviced/om-gta02/odeviced.conf
new file mode 100644 (file)
index 0000000..b2f979a
--- /dev/null
@@ -0,0 +1,4 @@
+[idlenotifier]
+# don't read from accellerometers for now
+ignoreinput=2,3
+
index cc4f18c..0819499 100644 (file)
@@ -2,21 +2,30 @@ DESCRIPTION = "The Open Device Daemon Prototype in Python"
 HOMEPAGE = "http://www.freesmartphone.org"
 AUTHOR = "Michael 'Mickey' Lauer <mlauer@vanille-media.de>"
 SECTION = "console/network"
-DEPENDS = "python"
+DEPENDS = "python-cython-native python-pyrex-native"
 LICENSE = "GPLv2"
-PV = "0.0+svnr${SRCREV}"
+PV = "0.7.9+svnr${SRCREV}"
 PR = "r0"
 
-inherit distutils
+inherit distutils update-rc.d
 
-#inherit update-rc.d
-#INITSCRIPT_NAME = "py-odeviced"
-#INITSCRIPT_PARAMS = "defaults 20"
+INITSCRIPT_NAME = "odeviced"
+INITSCRIPT_PARAMS = "defaults 20"
 
-SRC_URI = "svn://projects.linuxtogo.org/svn/smartphones/trunk/software;module=py-odeviced"
+SRC_URI = "svn://projects.linuxtogo.org/svn/smartphones/trunk/software;module=py-odeviced \
+           file://odeviced \
+           file://odeviced.conf"
 S = "${WORKDIR}/py-odeviced"
 
+do_install_append() {
+       install -d ${D}${sysconfdir}/init.d/
+       install -m 0755 ${WORKDIR}/odeviced ${D}${sysconfdir}/init.d/
+       install -m 0644 ${WORKDIR}/odeviced.conf ${D}${sysconfdir}
+}
+
 RDEPENDS_${PN} += "\
   python-dbus \
   python-pygobject \
 "
+
+FILES_${PN} += "${sysconfdir}"