summaryrefslogtreecommitdiff
path: root/org.handhelds.familiar/packages/gpsd
diff options
context:
space:
mode:
authorRene Wagner <rw@handhelds.org>2006-05-13 15:42:03 +0200
committerRene Wagner <rw@handhelds.org>2006-05-13 15:42:03 +0200
commit5a5346dfbec459c10d9e61e16e125b83975a1ef1 (patch)
tree342e16f3fe790d03b93294344e6154459888939f /org.handhelds.familiar/packages/gpsd
OE tree imported from monotone branch org.openembedded.oz354fam083 at revision 8b12e35772d79306d1d9de19c12b23681618532d.
Diffstat (limited to 'org.handhelds.familiar/packages/gpsd')
-rwxr-xr-xorg.handhelds.familiar/packages/gpsd/files/gpsd91
-rw-r--r--org.handhelds.familiar/packages/gpsd/gpsd.inc33
-rw-r--r--org.handhelds.familiar/packages/gpsd/gpsd_2.28.bb2
-rw-r--r--org.handhelds.familiar/packages/gpsd/gpsd_2.6.bb50
4 files changed, 176 insertions, 0 deletions
diff --git a/org.handhelds.familiar/packages/gpsd/files/gpsd b/org.handhelds.familiar/packages/gpsd/files/gpsd
new file mode 100755
index 0000000..289896f
--- /dev/null
+++ b/org.handhelds.familiar/packages/gpsd/files/gpsd
@@ -0,0 +1,91 @@
+#!/bin/sh
+#
+# gpsd This shell script starts and stops gpsd.
+#
+# chkconfig: 345 90 40
+# description: Gpsd manages access to a serial- or USB-connected GPS
+# processname: gpsd
+
+# If you must specify a non-NMEA driver, uncomment and modify the next line
+#GPSD_OPTS=
+GPS_DEV="/dev/ttyS3"
+
+# Source function library.
+#. /etc/rc.d/init.d/functions
+
+RETVAL=0
+prog="gpsd"
+
+start() {
+ # Start daemons.
+ echo -n "Starting $prog: "
+ # We don't use the daemon function here because of a known bug
+ # in initlog -- it spuriously returns a nonzero status when
+ # starting daemons that fork themselves. See
+ # http://bugzilla.redhat.com/bugzilla/show_bug.cgi?id=130629
+ # for discussion. Fortunately:
+ #
+ # 1. gpsd startup can't fail, or at least not in the absence of
+ # much larger resource-exhaustion problems that would be very obvious.
+ #
+ # 2. We don't need all the logging crud that daemon/initlog sets
+ # up -- gpsd does its own syslog calls.
+ #
+ if [ -e "${GPS_DEV}" ]
+ then
+ gpsd ${GPSD_OPTS} -p ${GPS_DEV}
+ echo "success"
+ else
+ # User needs to symlink ${GPS_DEV} to the right thing
+ echo "No ${GPS_DEV} device, aborting gpsd startup."
+ fi
+ RETVAL=$?
+ echo
+ [ $RETVAL -eq 0 ] && touch /var/lock/subsys/gpsd
+ return $RETVAL
+}
+
+stop() {
+ # Stop daemons.
+ echo -n "Shutting down $prog: "
+ killall gpsd
+# killproc gpsd
+ RETVAL=$?
+ echo
+ if [ $RETVAL -eq 0 ]
+ then
+ rm -f /var/lock/subsys/gpsd;
+ fi
+ return $RETVAL
+}
+
+# See how we were called.
+case "$1" in
+ start)
+ start
+ ;;
+ stop)
+ stop
+ ;;
+ restart|reload)
+ stop
+ start
+ RETVAL=$?
+ ;;
+ condrestart)
+ if [ -f /var/lock/subsys/gpsd ]; then
+ stop
+ start
+ RETVAL=$?
+ fi
+ ;;
+ status)
+# status gpsd
+# RETVAL=$?
+ ;;
+ *)
+ echo "Usage: $0 {start|stop|restart|condrestart|status}"
+ exit 1
+esac
+
+exit $RETVAL
diff --git a/org.handhelds.familiar/packages/gpsd/gpsd.inc b/org.handhelds.familiar/packages/gpsd/gpsd.inc
new file mode 100644
index 0000000..830385c
--- /dev/null
+++ b/org.handhelds.familiar/packages/gpsd/gpsd.inc
@@ -0,0 +1,33 @@
+DESCRIPTION = "A TCP/IP Daemon simplifying the communication with GPS devices"
+SECTION = "console/network"
+PRIORITY = "optional"
+LICENSE = "GPL"
+DEPENDS = "dbus-0.23.4 ncurses"
+
+SRC_URI = "http://download.berlios.de/gpsd/gpsd-${PV}.tar.gz \
+ file://gpsd"
+
+inherit autotools update-rc.d
+
+INITSCRIPT_NAME = "gpsd"
+INITSCRIPT_PARAMS = "defaults 35"
+
+export LDFLAGS = "-L${STAGING_LIBDIR} -lm"
+
+do_stage() {
+ oe_libinstall -so -C ${S}/.libs libgps ${STAGING_LIBDIR}
+ install -m 0655 ${S}/libgps.la ${STAGING_LIBDIR}
+ install -m 0655 ${S}/gps.h ${STAGING_INCDIR}
+ install -m 0655 ${S}/gpsd.h ${STAGING_INCDIR}
+}
+
+do_install_append() {
+ install -d ${D}/${sysconfdir}/init.d
+ install -d ${D}/dev
+ install -m 0755 ${WORKDIR}/gpsd ${D}/${sysconfdir}/init.d/
+}
+
+PACKAGES =+ "libgps"
+
+FILES_${PN} += "${sysconfdir}"
+FILES_libgps = "${libdir}/*.so*"
diff --git a/org.handhelds.familiar/packages/gpsd/gpsd_2.28.bb b/org.handhelds.familiar/packages/gpsd/gpsd_2.28.bb
new file mode 100644
index 0000000..cd5e223
--- /dev/null
+++ b/org.handhelds.familiar/packages/gpsd/gpsd_2.28.bb
@@ -0,0 +1,2 @@
+include gpsd.inc
+
diff --git a/org.handhelds.familiar/packages/gpsd/gpsd_2.6.bb b/org.handhelds.familiar/packages/gpsd/gpsd_2.6.bb
new file mode 100644
index 0000000..1bf8d87
--- /dev/null
+++ b/org.handhelds.familiar/packages/gpsd/gpsd_2.6.bb
@@ -0,0 +1,50 @@
+DESCRIPTION = "A TCP/IP Daemon simplifying the communication with GPS devices"
+SECTION = "network"
+PRIORITY = "optional"
+MAINTAINER = "Robert Anderson <rea@sr.unh.edu>"
+LICENSE = "GPL"
+PR = "r1"
+
+SRC_URI = "http://ftp.berlios.de/gpsd/gpsd-${PV}.tar.gz"
+
+inherit autotools update-rc.d
+
+INITSCRIPT_NAME = "gpsd"
+INITSCRIPT_PARAMS = "defaults 35"
+
+LDFLAGS = "-lm"
+
+do_configure() {
+ oe_runconf
+}
+
+do_compile() {
+ oe_runmake gpsd gpsd.1 libgps.3 libgpsd.3 gps.h gpsd.h
+}
+
+do_stage () {
+ oe_libinstall -so -C ${S}/.libs libgps ${STAGING_LIBDIR}
+ install -m 0655 ${S}/libgps.la ${STAGING_LIBDIR}
+ install -m 0655 ${S}/gps.h ${STAGING_INCDIR}
+ install -m 0655 ${S}/gpsd.h ${STAGING_INCDIR}
+}
+
+do_install () {
+ install -d ${D}${sbindir}
+ install -d ${D}${mandir}/man1
+ install -d ${D}${mandir}/man3
+ install -d ${D}${incdir}
+ install -d ${D}${libdir}
+ install -d ${D}${sysconfdir}/init.d
+
+ install -m 0755 ${S}/.libs/gpsd ${D}${sbindir}
+ oe_libinstall -so -C ${S}/.libs libgps ${D}${libdir}
+ install -m 755 gpsd.1 ${D}${mandir}/man1/gpsd.1
+ install -m 0755 ${S}/libgps.la ${D}${libdir}libgps.la
+ install -m 0755 ${S}/gps.h ${S}/gpsd.h ${D}${incdir}
+ install -m 755 libgps.3 libgpsd.3 ${D}${mandir}/man3/
+ install -m 755 gpsd.init ${D}${sysconfdir}/init.d/gpsd
+}
+
+PACKAGES =+ "gpsd-devdoc "
+FILES_${PN}-devdoc = "${mandir}/man3 "