add OBEX Push command line helpers
authorMichael Lauer <mickey@vanille-media.de>
Sun, 21 Aug 2005 22:16:21 +0000 (22:16 +0000)
committerOpenEmbedded Project <openembedded-devel@lists.openembedded.org>
Sun, 21 Aug 2005 22:16:21 +0000 (22:16 +0000)
packages/obexpush/.mtn2git_empty [new file with mode: 0644]
packages/obexpush/files/.mtn2git_empty [new file with mode: 0644]
packages/obexpush/files/init [new file with mode: 0644]
packages/obexpush/obexpush_1.0.0.bb [new file with mode: 0644]

diff --git a/packages/obexpush/.mtn2git_empty b/packages/obexpush/.mtn2git_empty
new file mode 100644 (file)
index 0000000..e69de29
diff --git a/packages/obexpush/files/.mtn2git_empty b/packages/obexpush/files/.mtn2git_empty
new file mode 100644 (file)
index 0000000..e69de29
diff --git a/packages/obexpush/files/init b/packages/obexpush/files/init
new file mode 100644 (file)
index 0000000..ac1fd62
--- /dev/null
@@ -0,0 +1,29 @@
+#!/bin/sh
+#
+#   /etc/init.d/obd: start or stop the OBEX Push helper daemon
+#
+
+PARAMS="--mode OBEX --channel 10 --path /tmp/opd --sdp --metadata"
+
+case "$1" in
+  start)
+      echo -n "Starting OBEX Push helper: opd"
+      opd $PARAMS &
+    ;;
+  stop)
+      echo -n "Shutting down OBEX Push helper: opd"
+      killall opd
+    ;;
+  restart|force-reload)
+    echo -n "Restarting OBEX Push helper: opd"
+    killall opd
+    sleep 2
+    obd $PARAMS &
+    ;;
+  *)
+      echo "Usage: /etc/init.d/obd {start|stop|restart|force-reload}"
+      exit 1
+    ;;
+esac
+
+exit 0
diff --git a/packages/obexpush/obexpush_1.0.0.bb b/packages/obexpush/obexpush_1.0.0.bb
new file mode 100644 (file)
index 0000000..97e2049
--- /dev/null
@@ -0,0 +1,41 @@
+DESCRIPTION = "Obex Push Utilities"
+HOMEPAGE = "http://www.caside.lancs.ac.uk/java_bt.php"
+SECTION = "console/network"
+LICENSE = "GPL"
+DEPENDS = "glib-2.0 openobex"
+
+SRC_URI = "http://www.caside.lancs.ac.uk/bt/obexpush.tar.gz \
+           file://init"
+S = "${WORKDIR}/obexpush"
+
+inherit update-rc.d
+
+INITSCRIPT_NAME = "opd"
+INITSCRIPT_PARAMS = "defaults 33 09"
+
+export GLIBINC=-I${STAGING_INCDIR}/glib-2.0
+export GLIBLIB=-I${STAGING_LIBDIR} -lglib-2.0
+export OBEXINC=-I${STAGING_INCDIR}
+export OBEXLIB=-L${STAGING_LIBDIR} -lopenobex
+
+do_configure() {
+       rm -f client/*.o client/ussp-push
+       rm -f opd/*.o opd/opd
+       sed -i 's:gcc:${CC}:' */Makefile
+       sed -i 's:__FUNCTION__::' opd/*.c
+}
+
+do_compile() {
+       oe_runmake -C client
+       oe_runmake -C opd
+}
+
+do_install() {
+       install -d ${D}${bindir}
+       install -m 0755 client/ussp-push ${D}${bindir}
+       install -m 0755 opd/opd ${D}${bindir}
+
+       install -d ${D}${sysconfdir}/init.d
+       install -m 0644 ${WORKDIR}/init ${D}${sysconfdir}/init.d/opd
+}
+