diff options
author | Steve Arnold <nerdboy@gentoo.org> | 2005-05-29 00:53:30 +0000 |
---|---|---|
committer | Steve Arnold <nerdboy@gentoo.org> | 2005-05-29 00:53:30 +0000 |
commit | 123de46581e08ee1432d861673d5c61f5d0f29b2 (patch) | |
tree | 55469655c6f845b88f2f8ce25023d074acc0d5c9 /sci-geosciences/gpsd | |
parent | mask dbus (diff) | |
download | gentoo-2-123de46581e08ee1432d861673d5c61f5d0f29b2.tar.gz gentoo-2-123de46581e08ee1432d861673d5c61f5d0f29b2.tar.bz2 gentoo-2-123de46581e08ee1432d861673d5c61f5d0f29b2.zip |
adding current version of gpsd (most other gps daemons are dead now)
(Portage version: 2.0.51.19)
Diffstat (limited to 'sci-geosciences/gpsd')
-rw-r--r-- | sci-geosciences/gpsd/ChangeLog | 18 | ||||
-rw-r--r-- | sci-geosciences/gpsd/Manifest | 8 | ||||
-rw-r--r-- | sci-geosciences/gpsd/files/40-usb-serial.rules | 4 | ||||
-rw-r--r-- | sci-geosciences/gpsd/files/digest-gpsd-2.25 | 1 | ||||
-rw-r--r-- | sci-geosciences/gpsd/files/gpsd-2.25-y-format.patch | 95 | ||||
-rw-r--r-- | sci-geosciences/gpsd/files/gpsd.conf | 23 | ||||
-rwxr-xr-x | sci-geosciences/gpsd/files/gpsd.init | 35 | ||||
-rw-r--r-- | sci-geosciences/gpsd/gpsd-2.25.ebuild | 99 | ||||
-rw-r--r-- | sci-geosciences/gpsd/metadata.xml | 11 |
9 files changed, 294 insertions, 0 deletions
diff --git a/sci-geosciences/gpsd/ChangeLog b/sci-geosciences/gpsd/ChangeLog new file mode 100644 index 000000000000..42cd0d48a115 --- /dev/null +++ b/sci-geosciences/gpsd/ChangeLog @@ -0,0 +1,18 @@ +# ChangeLog for sci-geosciences/gpsd +# Copyright 1999-2005 Gentoo Foundation; Distributed under the GPL v2 +# $Header: /var/cvsroot/gentoo-x86/sci-geosciences/gpsd/ChangeLog,v 1.1 2005/05/29 00:53:30 nerdboy Exp $ + +*gpsd-2.25 (28 May 2005) + + 28 May 2005; Steve Arnold <nerdboy@gentoo.org> +files/40-usb-serial.rules, + +files/gpsd-2.25-y-format.patch, +files/gpsd.conf, +files/gpsd.init, + +metadata.xml, +gpsd-2.25.ebuild: + added esr's patch for Y format messages, updated the einfo, and cleaned + up the arch stuff a bit + +*gpsd-2.25 (28 May 2005) + + 28 May 2005; Steve Arnold <nerdboy@gentoo.org> +files/40-usb-serial.rules, + +files/gpsd.conf, +files/gpsd.init, +metadata.xml, +gpsd-2.25.ebuild: + adding current version of gpsd (most other gps daemons are dead now) + diff --git a/sci-geosciences/gpsd/Manifest b/sci-geosciences/gpsd/Manifest new file mode 100644 index 000000000000..f20703d23a9f --- /dev/null +++ b/sci-geosciences/gpsd/Manifest @@ -0,0 +1,8 @@ +MD5 d2302977bcafc65fc770b9f53cdcff55 gpsd-2.25.ebuild 3507 +MD5 78ec9f0a49a5a89267a4b8953d904de9 metadata.xml 420 +MD5 06766ddb5b5b885ef83573af733e21ee ChangeLog 679 +MD5 f6622a741ad185c494741151fac6f920 files/40-usb-serial.rules 212 +MD5 4945e25f15ab3f3b28440cb83d14c7c9 files/gpsd.conf 768 +MD5 e77e7a748b773d26ee2c5c21dae96544 files/gpsd.init 850 +MD5 7e6d1d3e16536b0ccd1ad7f0c0d92c58 files/gpsd-2.25-y-format.patch 3987 +MD5 2760a88bc02861b5ff0f752758db08a3 files/digest-gpsd-2.25 61 diff --git a/sci-geosciences/gpsd/files/40-usb-serial.rules b/sci-geosciences/gpsd/files/40-usb-serial.rules new file mode 100644 index 000000000000..6c0f460c846f --- /dev/null +++ b/sci-geosciences/gpsd/files/40-usb-serial.rules @@ -0,0 +1,4 @@ +# Sample udev rule for ttyUSB devices used by cheap GPS hardware (for use with +# gpsd) such as a PL2303 USB-Serial adapter. + +KERNEL="ttyUSB[0-9]*", NAME="tts/USB%n", SYMLINK="ttyUSB%n", GROUP="tty", MODE="0660" diff --git a/sci-geosciences/gpsd/files/digest-gpsd-2.25 b/sci-geosciences/gpsd/files/digest-gpsd-2.25 new file mode 100644 index 000000000000..7c015bc52257 --- /dev/null +++ b/sci-geosciences/gpsd/files/digest-gpsd-2.25 @@ -0,0 +1 @@ +MD5 6341f5c804993513151b756846b685a9 gpsd-2.25.tar.gz 477056 diff --git a/sci-geosciences/gpsd/files/gpsd-2.25-y-format.patch b/sci-geosciences/gpsd/files/gpsd-2.25-y-format.patch new file mode 100644 index 000000000000..0eb646cda6c0 --- /dev/null +++ b/sci-geosciences/gpsd/files/gpsd-2.25-y-format.patch @@ -0,0 +1,95 @@ +--- gps.py.orig 2005-05-16 18:27:07.000000000 -0700 ++++ gps.py 2005-05-28 11:56:33.000000000 -0700 +@@ -319,46 +319,47 @@ + if self.fix.epc: + self.valid |= CLIMBERR_SET + elif cmd in ('P', 'p'): +- (self.fix.latitude, self.fix.longitude) = map(float, data.split()) +- self.valid |= LATLON_SET ++ (self.fix.latitude, self.fix.longitude) = map(float, data.split()) ++ self.valid |= LATLON_SET + elif cmd in ('Q', 'q'): +- parts = data.split() +- self.satellites_used = int(parts[0]) +- (self.pdop, self.hdop, self.vdop) = map(float, parts[1:]) +- self.valid |= HDOP_SET | VDOP_SET | PDOP_SET ++ parts = data.split() ++ self.satellites_used = int(parts[0]) ++ (self.pdop, self.hdop, self.vdop) = map(float, parts[1:]) ++ self.valid |= HDOP_SET | VDOP_SET | PDOP_SET + elif cmd in ('S', 's'): +- self.status = int(data) +- self.valid |= STATUS_SET ++ self.status = int(data) ++ self.valid |= STATUS_SET + elif cmd in ('T', 't'): +- self.fix.track = float(data) +- self.valid |= TRACK_SET ++ self.fix.track = float(data) ++ self.valid |= TRACK_SET + elif cmd in ('U', 'u'): +- self.fix.climb = float(data) +- self.valid |= CLIMB_SET ++ self.fix.climb = float(data) ++ self.valid |= CLIMB_SET + elif cmd in ('V', 'v'): +- self.fix.speed = float(data) +- self.valid |= SPEED_SET ++ self.fix.speed = float(data) ++ self.valid |= SPEED_SET + elif cmd in ('X', 'x'): +- if data == '?': +- self.online = -1 +- self.device = None +- else: +- self.online = float(data) +- self.valid |= ONLINE_SET ++ if data == '?': ++ self.online = -1 ++ self.device = None ++ else: ++ self.online = float(data) ++ self.valid |= ONLINE_SET + elif cmd in ('Y', 'y'): + satellites = data.split(":") +- self.timings.sentence_tag = satellites.pop(0) +- self.timings.sentence_time = satellites.pop(0) ++ prefix = satellites.pop(0).split() ++ self.timings.sentence_tag = prefix.pop(0) ++ self.timings.sentence_time = prefix.pop(0) + if self.timings.sentence_time != "?": +- float(self.timings.sentence_time) +- d1 = int(satellites.pop(0)) ++ self.timings.sentence_time = float(self.timings.sentence_time) ++ d1 = int(prefix.pop(0)) + newsats = [] + for i in range(d1): + newsats.append(gps.satellite(*map(int, satellites[i].split()))) + self.satellites = newsats + self.valid |= SATELLITE_SET + elif cmd in ('Z', 'z'): +- self.profiling = (data[0] == '1') ++ self.profiling = (data[0] == '1') + elif cmd == '$': + self.timings.collect(*data.split()) + if self.raw_hook: +@@ -373,12 +374,13 @@ + sys.stderr.write("GPS DATA %s\n" % repr(data)) + self.timings.c_recv_time = time.time() + self.__unpack(data) +- if self.timings.sentence_time: +- basetime = self.timings.sentence_time +- else: +- basetime = self.timings.d_xmit_time +- self.timings.c_decode_time = time.time() - basetime +- self.timings.c_recv_time -= basetime ++ if self.profiling: ++ if self.timings.sentence_time != '?': ++ basetime = self.timings.sentence_time ++ else: ++ basetime = self.timings.d_xmit_time ++ self.timings.c_decode_time = time.time() - basetime ++ self.timings.c_recv_time -= basetime + return 0 + + def query(self, commands): diff --git a/sci-geosciences/gpsd/files/gpsd.conf b/sci-geosciences/gpsd/files/gpsd.conf new file mode 100644 index 000000000000..ab7a81f5cf44 --- /dev/null +++ b/sci-geosciences/gpsd/files/gpsd.conf @@ -0,0 +1,23 @@ +# Copyright 1999-2005 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Header: /var/cvsroot/gentoo-x86/sci-geosciences/gpsd/files/gpsd.conf,v 1.1 2005/05/29 00:53:30 nerdboy Exp $ + +# Config file for gpsd server + +# ATTENTION: most of the configuration is done in the kernel device +# setup for USB/Serial, Garmin, or other. + +# Set GPS_DEV to the device to be used by the gpsd server. +# This device must have the group tty and be writable (see +# the udev rule in the docs). + +# This example is for a Deluo GPS Serial/USB converter dongle, really +# a pl2303 chip - CONFIG_USB_SERIAL_PL2303 in modern 2.6 kernels. +# The udev rule provides the symlink below to /dev/tts/USB0 +# The second one is just a normal serial port... + +#GPS_DEV="/dev/ttyUSB0" + +#GPS_DEV="/dev/ttyS0 + +GPSD_OPTS="-P /var/run/gpsd.pid -f GPS0 -F /var/run/gpsd.sock" diff --git a/sci-geosciences/gpsd/files/gpsd.init b/sci-geosciences/gpsd/files/gpsd.init new file mode 100755 index 000000000000..d770dd5ae599 --- /dev/null +++ b/sci-geosciences/gpsd/files/gpsd.init @@ -0,0 +1,35 @@ +#!/sbin/runscript +# Copyright 1999-2004 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Header: /var/cvsroot/gentoo-x86/sci-geosciences/gpsd/files/gpsd.init,v 1.1 2005/05/29 00:53:30 nerdboy Exp $ + +# You can use this init script to manage a serial port GPS or other +# non-hotplug device (or any device for that matter). By design, +# USB devices should use the hotplug script instead. + +depend() { + after serial hotplug +} + +checkconfig() { + if [ -z "${GPS_DEV}" ]; then + eerror "You must define GPS_DEV in /etc/conf.d/gpsd." + return 1 + fi +} + +start() { + checkconfig || return 1 + ebegin "Starting gpsd" + touch /var/run/gpsd.pid + # comment the device parameter to use with a hot-pluggable device + /usr/sbin/gpsd ${GPSD_OPTS} -p ${GPS_DEV} + eend $? "Failed to start gpsd" +} + +stop() { + ebegin "Stopping gpsd" + killall -q gpsd >/dev/null + eend $? "Failed to stop gpsd" + rm -f /var/run/gpsd.pid /var/run/gpsd.sock +} diff --git a/sci-geosciences/gpsd/gpsd-2.25.ebuild b/sci-geosciences/gpsd/gpsd-2.25.ebuild new file mode 100644 index 000000000000..e05b2af35b84 --- /dev/null +++ b/sci-geosciences/gpsd/gpsd-2.25.ebuild @@ -0,0 +1,99 @@ +# Copyright 1999-2005 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Header: /var/cvsroot/gentoo-x86/sci-geosciences/gpsd/gpsd-2.25.ebuild,v 1.1 2005/05/29 00:53:30 nerdboy Exp $ + +inherit eutils libtool distutils + +DESCRIPTION="GPS daemon and library to support USB/serial GPS devices and various GPS/mapping clients." +HOMEPAGE="http://gpsd.berlios.de/" +SRC_URI="http://download.berlios.de/gpsd/${P}.tar.gz" + +LICENSE="BSD" +SLOT="0" +KEYWORDS="~x86 ~ppc ~amd64 ~ppc64 ~sparc ~arm" + +IUSE="X usb dbus" + +DEPEND="X? ( || ( lesstif motif ) virtual/x11 ) + usb? ( sys-apps/hotplug ) + dbus? ( >=sys-apps/dbus-0.23.4 ) + dev-lang/python + app-text/xmlto + virtual/libc + sys-devel/gcc" + +src_unpack() { + unpack ${A} + cd ${S} + # remove patch for >=2.26 + epatch ${FILESDIR}/${P}-y-format.patch + elibtoolize +} + +src_compile() { + distutils_python_version + export MY_ECONF="--with-gnu-ld --with-pic $(use_with X x) $(use_enable dbus)" + econf ${MY_ECONF} || die "econf failed" + emake || die "emake failed" +} + +src_install() { + cd ${S} + make DESTDIR=${D} install + + if use usb ; then + sed -i -e "s/gpsd.hotplug/gpsd/g" gpsd.hotplug gpsd.usermap + insinto /etc/hotplug/usb + doins gpsd.usermap + exeinto /etc/hotplug/usb + newexe gpsd.hotplug gpsd + else + newconfd ${FILESDIR}/gpsd.conf gpsd + newinitd ${FILESDIR}/gpsd.init gpsd + fi + if use X ; then + insinto /usr/lib/X11/app-defaults + newins xgps.ad xgps + newins xgpsspeed.ad xgpsspeed + fi + dobin logextract + diropts "-m0644" + exeinto /usr/lib/python${PYVER}/site-packages + doexe gps.py + dodoc AUTHORS HACKING INSTALL README TODO ${FILESDIR}/40-usb-serial.rules +} + +pkg_postinst() { + einfo "To use hotplugging (USB devices) your kernel has to be compiled" + einfo "with CONFIG_HOTPLUG enabled and sys-apps/hotplug must be emerged" + einfo "(both usb and dbus support are optional)." + einfo + einfo "Different GPS devices require the corresponding kernel options" + einfo "to be enabled, such as USB_SERIAL_GARMIN, or a USB serial driver" + einfo "for an adapter, such as those that come with Deluo GPS units (eg," + einfo "USB_SERIAL_PL2303). Straight serial devices should always work," + einfo "even without hotplug support." + ewarn + ewarn "The current gpsd may not start correctly except when run manually" + ewarn "via sudo with wheel permissions (or directly as root using the" + ewarn "supplied init script). Depending on system configuration, hotplug" + ewarn "doesn't always get the right device permissions (we're working on" + ewarn "it). If your client connection shows no data when gpsd is started" + ewarn "via the normal hotplug action, then kill the existing gpsd process" + ewarn "and try starting it directly via something like:" + ewarn "sudo /usr/sbin/gpsd -p /dev/ttyUSB0" + ewarn "or whatever your device is. This will verify whether your device" + ewarn "is working or not." + ewarn + einfo "Read the INSTALL doc for more information on supported hardware," + einfo "and make sure udev has the right group permissions set on the tty" + einfo "devices if using USB (it should Do The Right Thing (TM))..." + einfo + einfo "Finally, the default gpsd setup looks for /dev/ttyUSB0, in the" + einfo "case of the USB-serial adapter mentioned above. Depending on" + einfo "your default device scheme (ie, udev, devfs, static), you will" + einfo "need to create a device alias if the default name is different." + einfo "A udev rule file has been provided with an example rule in the" + einfo "docs directory. If the device names are correct, gpsd will" + einfo "start automatically when the GPS device is plugged in." +} diff --git a/sci-geosciences/gpsd/metadata.xml b/sci-geosciences/gpsd/metadata.xml new file mode 100644 index 000000000000..77d4fac9f026 --- /dev/null +++ b/sci-geosciences/gpsd/metadata.xml @@ -0,0 +1,11 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd"> +<pkgmetadata> +<herd>sci</herd> +<maintainer> + <email>nerdboy@gentoo.org</email> + <name>Steve Arnold</name> +</maintainer> +<longdescription>Unbundled GPS daemon and library to support USB/serial GPS devices and various GPS/mapping clients, such as GPSDrive, kismet, and pygps. +</longdescription> +</pkgmetadata> |