summaryrefslogtreecommitdiff
path: root/system
diff options
context:
space:
mode:
Diffstat (limited to 'system')
-rw-r--r--system/gpsd/README33
-rw-r--r--system/gpsd/README.build113
-rw-r--r--system/gpsd/gpsd-pkgconfig_templates.patch22
-rw-r--r--system/gpsd/gpsd.SlackBuild57
-rw-r--r--system/gpsd/gpsd.hotplug124
-rw-r--r--system/gpsd/gpsd.hotplug.wrapper41
-rw-r--r--system/gpsd/gpsd.info10
-rw-r--r--system/gpsd/rc.gpsd.new7
-rw-r--r--system/gpsd/slack-desc10
9 files changed, 122 insertions, 295 deletions
diff --git a/system/gpsd/README b/system/gpsd/README
index a111f54615..379d93e8bd 100644
--- a/system/gpsd/README
+++ b/system/gpsd/README
@@ -4,28 +4,31 @@ location, course, and velocity available to be queried on TCP port
2947 of the host computer. With gpsd, multiple GPS client applications
(such as navigational and wardriving software) can share access to GPSes
without contention or loss of data. Applications that presently use
-gpsd include Viking and Kismet.
+gpsd include Viking, foxtrotgps and Kismet.
-See README.build for some additional build options that might be useful.
+See README.build for some build options that might be useful.
-To enable automatic startup of gpsd at boot time, or when a GPS device is
-connected via USB, you need to do the following three steps:
+To enable automatic startup of gpsd at boot time, or when a GPS device
+is connected via USB, you need to do the following four steps:
-1. Edit the file /lib/udev/rules.d/97-gpsd.rules and uncomment the line
-(or lines) beginning '#ATTRS' that corresponds to your GPS hardware and
-save it in /etc/udev/rules.d/. To avoid confusion with other USB serial
-devices that you might have, do not uncomment lines that do not
-correspond to your GPS hardware.
+1. Copy the file /lib/udev/rules.d/97-gpsd.rules to /etc/udev/rules.d/
-2. Make the file /etc/rc.d/rc.gpsd executable.
+2. Edit the file /etc/udev/rules.d/97-gpsd.rules and uncomment the line
+(or lines) beginning '#ATTRS' that corresponds to your GPS hardware.
+To avoid confusion with other USB serial devices that you might have,
+do not uncomment lines that do not correspond to your GPS hardware.
+But if you do not know which line to uncomment, and you do not have any
+other serial devices, you can uncomment them all :-)
+
+3. Make the file /etc/rc.d/rc.gpsd executable.
chmod +x /etc/rc.d/rc.gpsd
-3. Add the following lines to /etc/rc.d/rc.local
+4. Add the following lines to /etc/rc.d/rc.local
if [ -x /etc/rc.d/rc.gpsd ]; then
/etc/rc.d/rc.gpsd start
fi
-Configuration options may be set in the file /etc/rc.d/rc.gpsd.conf. The
-defaults will usually be adequate. However, if your GPS is on a real (non-USB)
-serial port -- for example, /dev/ttyS0 -- you should add /dev/ttyS0 to
-GPS_DEVICES in /etc/rc.d/rc.gpsd.conf.
+Configuration options may be set in the file /etc/rc.d/rc.gpsd.conf.
+The defaults will usually be adequate. However, if your GPS is on a
+real (non-USB) serial port -- for example, /dev/ttyS0 -- you should add
+/dev/ttyS0 to GPS_DEVICES in /etc/rc.d/rc.gpsd.conf.
diff --git a/system/gpsd/README.build b/system/gpsd/README.build
index 1aeeea6739..77610ecc8f 100644
--- a/system/gpsd/README.build
+++ b/system/gpsd/README.build
@@ -1,64 +1,73 @@
Enabling and disabling devices and features
-------------------------------------------
-Support for various devices and features may be enabled
-and/or disabled by setting the variables ENABLE and DISABLE
-before running gpsd.SlackBuild, for example
+Support for various devices and features may be enabled and/or disabled by
+setting the variables ENABLE and DISABLE before running gpsd.SlackBuild,
+for example
-ENABLE="bluetooth,pps-on-cts" DISABLE=pps ./gpsd.SlackBuild
+ENABLE="fixed_port_speed=9600,timing" DISABLE="bluez,ipv6" ./gpsd.SlackBuild
-Multiple options may be separated by commas (as shown above)
-or by spaces.
+Multiple options may be separated by commas (as shown above) or by spaces.
-The following devices and features may be enabled
-(by default they are disabled).
+The following features may be enabled (by default they are disabled).
+ dbus_export enable DBUS export support
profiling enable profiling support
- pps-on-cts Enable PPS pulse on CTS rather than DCD
- gpsd-user=username
- GPSD privilege revokation user (default 'nobody')
- fixed-port-speed=nnn
- compile with fixed serial port speed
- max-clients=nnn
- compile with limited maximum clients
- max-devices=nnn
- compile with maximum allowed devices
- squelch squelch gpsd_report and gpsd_hexdump to save cpu
- raw enable raw measurement processing
- bluetooth enable experimental Bluetooth support via BlueZ
+ timing enable latency timing support
+ squelch enable gpsd_report/gpsd_hexdump suppression (saves cpu)
+ gpsd_group=groupname
+ set privilege revocation group (default=dialout)
+ gpsd_user=username
+ set privilege revocation user (default=nobody)
+ fixed_port_speed=nnnn
+ set fixed serial port speed
+ fixed_stop_bits=n
+ set fixed serial port stop bits
+ limited_max_clients=n
+ set maximum allowed clients
+ limited_max_devices=n
+ set maximum allowed devices
-The following devices and features may be disabled
-(by default they are enabled).
+The following devices and features may be disabled (by default they are
+enabled).
- dbus disable DBUS support
- nmea disable NMEA support
- oncore disable Motorola OnCore chipset support
- sirf disable SiRF chipset support
- superstar2 disable SuperStarII chipset support
- tsip disable Trimble TSIP support
- fv18 disable San Jose Navigation FV-18 support
- tripmate disable DeLorme TripMate support
- earthmate disable DeLorme EarthMate Zodiac support
- itrax disable iTrax hardware support
- ashtech disable Ashtech support
- navcom disable Navcom support
- garmin disable Garmin kernel driver support
- garmintxt disable Garmin Simple Text support
- tnt disable True North Technologies support
- oceanserver disable OceanServer support
- ubx disable UBX Protocol support
- geostar disable Geostar Protocol support
- evermore disable EverMore binary support
- mkt3301 disable MKT-3301 support
- gpsclock disable GPSClock support
- rtcm104v2 disable rtcm104v2 support
- rtcm104v3 disable rtcm104v3 support
- ntrip disable NTRIP support
- aivdm disable Aivdm support
- ntpshm disable NTP time hinting support
- pps disable PPS time syncing support
- timing disable latency timing support
- reconfigure do not allow gpsd to change device settings
- controlsend do not allow gpsctl/gpsmon to change device settings
+ aivdm disable AIVDM support
+ ashtech disable Ashtech support
+ bluez disable BlueZ support for Bluetooth devices
+ control_socket disable control socket for hotplug notifications
+ controlsend disable gpsctl/gpsmon can change device settings
+ earthmate disable DeLorme EarthMate Zodiac support
+ evermore disable EverMore binary support
+ fury disable Jackson Labs Fury and Firefly support
+ fv18 disable San Jose Navigation FV-18 support
+ garmin disable Garmin kernel driver support
+ garmintxt disable Garmin Simple Text support
+ geostar disable Geostar Protocol support
+ gpsclock disable GPSClock support
+ ipv6 disable build IPv6 support
+ itrax disable iTrax hardware support
+ mtk3301 disable MTK-3301 support
+ navcom disable Navcom support
+ netfeed disable support for handling TCP/IP data sources
+ nmea disable NMEA support
+ nmea2000 disable NMEA2000/CAN support
+ ntpshm disable NTP time hinting support
+ ntrip disable NTRIP support
+ oceanserver disable OceanServer support
+ oldstyle disable oldstyle (pre-JSON) protocol support
+ oncore disable Motorola OnCore chipset support
+ passthrough disable support for passing through JSON
+ pps disable PPS time syncing support
+ reconfigure disable gpsd can change device settings
+ rtcm104v2 disable rtcm104v2 support
+ rtcm104v3 disable rtcm104v3 support
+ shm_export disable export via shared memory
+ sirf disable SiRF chipset support
+ socket_export disable data export over sockets
+ superstar2 disable Novatel SuperStarII chipset support
+ tnt disable True North Technologies support
+ tripmate disable DeLorme TripMate support
+ tsip disable Trimble TSIP support
+ ubx disable UBX Protocol support
diff --git a/system/gpsd/gpsd-pkgconfig_templates.patch b/system/gpsd/gpsd-pkgconfig_templates.patch
deleted file mode 100644
index 572225b932..0000000000
--- a/system/gpsd/gpsd-pkgconfig_templates.patch
+++ /dev/null
@@ -1,22 +0,0 @@
-diff -Nur gpsd-2.39.orig/libgps.pc.in gpsd-2.39/libgps.pc.in
---- gpsd-2.39.orig/libgps.pc.in 2009-02-17 06:56:57.000000000 -0600
-+++ gpsd-2.39/libgps.pc.in 2009-10-05 14:30:12.894417725 -0500
-@@ -1,6 +1,6 @@
- prefix=@prefix@
- exec_prefix=${prefix}
--libdir=${exec_prefix}/lib
-+libdir=@libdir@
- includedir=${prefix}/include
-
- Name: GPSD
-diff -Nur gpsd-2.39.orig/libgpsd.pc.in gpsd-2.39/libgpsd.pc.in
---- gpsd-2.39.orig/libgpsd.pc.in 2009-02-17 06:56:57.000000000 -0600
-+++ gpsd-2.39/libgpsd.pc.in 2009-10-05 14:30:22.191417725 -0500
-@@ -1,6 +1,6 @@
- prefix=@prefix@
- exec_prefix=${prefix}
--libdir=${exec_prefix}/lib
-+libdir=@libdir@
- includedir=${prefix}/include
-
- Name: libgpsd
diff --git a/system/gpsd/gpsd.SlackBuild b/system/gpsd/gpsd.SlackBuild
index 62962e1390..1ad69aaae8 100644
--- a/system/gpsd/gpsd.SlackBuild
+++ b/system/gpsd/gpsd.SlackBuild
@@ -1,6 +1,7 @@
#!/bin/sh
# Slackware build script for gpsd
+
# Copyright 2011 David Spencer, Baildon, West Yorkshire, U.K.
# All rights reserved.
#
@@ -22,8 +23,8 @@
# ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
PRGNAM=gpsd
-VERSION=${VERSION:-2.95}
-BUILD=${BUILD:-2}
+VERSION=${VERSION:-3.9}
+BUILD=${BUILD:-1}
TAG=${TAG:-_SBo}
if [ -z "$ARCH" ]; then
@@ -59,14 +60,21 @@ ENABLELIST=""
set -- $(echo $ENABLE | sed 's/,/ /g')
while [ "$1" != "" ]
do
- ENABLELIST+=" --enable-$1"
+ case "$1" in
+ *=* )
+ ENABLELIST+=" $1"
+ ;;
+ * )
+ ENABLELIST+=" $1=yes"
+ ;;
+ esac
shift
done
DISABLELIST=""
set -- $(echo $DISABLE | sed 's/,/ /g')
while [ "$1" != "" ]
do
- DISABLELIST+=" --disable-$1"
+ DISABLELIST+=" $1=no"
shift
done
@@ -79,29 +87,20 @@ cd $PRGNAM-$VERSION
chown -R root:root .
chmod -R u+w,go+r-w,a-s .
-# Fixup the pkgconfig file templates
-# (force "pkg-config --libs libgps[d]" to return -L/usr/lib64 on x86_64)
-patch -p1 < $CWD/gpsd-pkgconfig_templates.patch
-
-CFLAGS="$SLKCFLAGS" \
-CXXFLAGS="$SLKCFLAGS" \
-./configure \
- --prefix=/usr \
- --libdir=/usr/lib${LIBDIRSUFFIX} \
- --sysconfdir=/etc \
- --localstatedir=/var \
- --mandir=/usr/man \
- --disable-static \
- --enable-dbus \
- --build=$ARCH-slackware-linux \
+CFLAGS=$SLKCFLAGS \
+scons \
+ prefix=/usr \
+ libdir=/usr/lib${LIBDIRSUFFIX} \
+ pkgconfigdir=/usr/lib${LIBDIRSUFFIX}/pkgconfig \
+ mandir=/usr/man \
+ chrpath=no \
$ENABLELIST \
$DISABLELIST
-make
-
-# --no-print-directory prevents crazy gps-2.94-py2.6.egg-info install path
-# (thanks again Niels Horn!)
-make --no-print-directory install-strip DESTDIR=$PKG
+DESTDIR=$PKG \
+scons \
+ --implicit-deps-unchanged \
+ install
find $PKG/usr/man -type f -exec gzip -9 {} \;
for i in $(find $PKG/usr/man -type l) ; do ln -s $( readlink $i ).gz $i.gz ; rm $i ; done
@@ -113,12 +112,14 @@ install -D -m 0644 $CWD/xgpsspeed.desktop \
install -D -m 0644 packaging/X11/gpsd-logo.png \
$PKG/usr/share/pixmaps/gpsd-logo.png
-# Use hotplug scripts from gpsd-3.0 instead of 2.95 -- they work ;-)
-install -D -m 0755 $CWD/gpsd.hotplug \
+# Get hotplug config from /etc/rc.d/rc.gpsd.conf not /etc/default/gpsd
+sed -i 's;/etc/default/gpsd;/etc/rc.d/rc.gpsd.conf;' gpsd.hotplug
+install -D -m 0755 gpsd.hotplug \
$PKG/lib/udev/gpsd.hotplug
-install -D -m 0755 $CWD/gpsd.hotplug.wrapper \
- $PKG/lib/udev/gpsd.hotplug.wrapper
mkdir -p $PKG/lib/udev/rules.d
+
+# Comment out all udev rules: the user is expected to enable only the
+# rules required (see README)
cat gpsd.rules | \
sed 's/^ATTRS/#&/' \
>$PKG/lib/udev/rules.d/97-gpsd.rules
diff --git a/system/gpsd/gpsd.hotplug b/system/gpsd/gpsd.hotplug
deleted file mode 100644
index 805f941998..0000000000
--- a/system/gpsd/gpsd.hotplug
+++ /dev/null
@@ -1,124 +0,0 @@
-#!/usr/bin/python
-#
-# This file is Copyright (c) 2010 by the GPSD project
-# BSD terms apply: see the file COPYING in the distribution root for details.
-#
-# Hotplug script for gpsd by Eric S. Raymond, March 2005
-# This script is part of the gpsd distribution: see http://gpsd.berlios.de
-# Can be called like "gpsd.hotplug [add|remove] /dev/ttyUSB0" for test
-# purposes.
-import sys, time, os, syslog, glob, socket, stat
-
-CONTROL_SOCKET = os.getenv('GPSD_SOCKET') or "/var/run/gpsd.sock"
-GPSD_OPTIONS = os.getenv('GPSD_OPTIONS') or ""
-
-WHEREAMI = __file__
-
-def gpsd_control_connect(complain=True):
- "Acquire a connection to the GPSD control socket."
- if not os.path.exists(CONTROL_SOCKET):
- syslog.syslog("socket %s doesn't exist" % CONTROL_SOCKET)
- return None
- try:
- sock = socket.socket(socket.AF_UNIX, socket.SOCK_STREAM, 0)
- sock.connect(CONTROL_SOCKET)
- except socket.error, msg:
- if complain:
- syslog.syslog("socket %s creation failure: %s" % (CONTROL_SOCKET, msg))
- if sock:
- sock.close()
- sock = None
- #else:
- # syslog.syslog("socket %s created OK" % CONTROL_SOCKET)
- return sock
-
-def gpsd_control(action, argument):
- "Pass a command to gpsd; start the daemon if not already running."
- syslog.syslog("gpsd_control(action=%s, arg=%s)" % (action, argument))
- connect = gpsd_control_connect(complain=False)
- if connect:
- syslog.syslog("reached a running gpsd")
- elif action == 'add':
- gpsdcmd = "gpsd %s -F %s" % (GPSD_OPTIONS, CONTROL_SOCKET)
- syslog.syslog("launching %s" % gpsdcmd)
- os.system(gpsdcmd)
- connect = gpsd_control_connect(complain=True)
- if not connect:
- syslog.syslog("can't reach gpsd")
- return None
- # We've got a live connection to the gpsd control socket. No
- # need to parse the response, because gpsd will lock on to the
- # device if it's really a GPS and ignore it if it's not.
- if action == 'add':
- # Force the group-read & group-write bits on, so gpsd will still be
- # able to use this device after dropping root privileges.
- os.chmod(argument, stat.S_IMODE(os.stat(argument)[stat.ST_MODE])|0660)
- connect.sendall("+%s\r\n" % argument)
- connect.recv(12)
- elif action == 'remove':
- connect.sendall("-%s\r\n" % argument)
- connect.recv(12)
- elif action == 'send':
- connect.sendall("%s\r\n" % argument)
- connect.recv(12)
- connect.close()
- #syslog.syslog("gpsd_control ends")
- return action
-
-def hotplug(action, devpath):
- #syslog.syslog("ACTION=%s DEVPATH=%s" % (action,devpath))
- if not devpath:
- syslog.syslog("No device")
- else:
- subnodes = glob.glob("/sys" + devpath + "/*")
- subnodes = map(os.path.basename, subnodes)
- subnodes = filter(lambda s: s.startswith("ttyUSB"), subnodes)
- if len(subnodes) == 0:
- syslog.syslog("no ttyUSB device under " + devpath)
- return
- elif len(subnodes) > 1:
- syslog.syslog("too many ttyUSB devices under " + devpath)
- return
- else:
- tty = "/dev/" + subnodes[0]
-
- syslog.syslog("waiting for " + tty)
- while not os.path.exists(tty):
- time.sleep(1)
- syslog.syslog(tty + " has gone active")
-
- gpsd_control(action, tty)
-
- remover = os.getenv("REMOVER")
- #syslog.syslog("REMOVER=%s" % remover)
- fp = open(remover, "w")
- fp.write(WHEREAMI + " remove " + tty)
- fp.close()
- os.chmod(remover, stat.S_IRUSR|stat.S_IXUSR|stat.S_IRGRP|stat.S_IXGRP)
- return
-
-if __name__ == '__main__':
- # In recent versions of udev, the gpsd script runs in series with
- # the task that creates the real /dev/ttyUSB0 device
- # node. Unfortunately, the gpsd script runs BEFORE the creation of
- # the node, and the node is not created until after you kill the
- # gpsd script, because the gpsd script waits forever for the node
- # to appear.
- #
- # This is a race condition, and is best fixed by running the
- # actual wait/hotplug portion in the background.
- pid = os.fork()
- if not pid:
- syslog.openlog('gpsd.hotplug', 0, syslog.LOG_DAEMON)
- try:
- if len(sys.argv) == 1: # Called as hotplug script
- hotplug(os.getenv("ACTION"), os.getenv("DEVPATH"))
- else: # Called by hand for testing
- gpsd_control(sys.argv[1], sys.argv[2])
- except:
- (exc_type, exc_value, exc_traceback) = sys.exc_info()
- syslog.syslog("gpsd.hotplug: exception %s yields %s" % (exc_type, exc_value))
- raise exc_type, exc_value, exc_traceback
- #syslog.syslog("gpsd.hotplug ends")
- syslog.closelog()
-
diff --git a/system/gpsd/gpsd.hotplug.wrapper b/system/gpsd/gpsd.hotplug.wrapper
deleted file mode 100644
index 429db379ce..0000000000
--- a/system/gpsd/gpsd.hotplug.wrapper
+++ /dev/null
@@ -1,41 +0,0 @@
-#!/bin/sh
-#
-# This file is Copyright (c) 2010 by the GPSD project
-# BSD terms apply: see the file COPYING in the distribution root for details.
-# [Modified to add Slackware-friendly conf file]
-
-PATH=/usr/sbin:$PATH
-export PATH
-
-if [ -r /etc/default/gpsd ]; then
- . /etc/default/gpsd
-elif [ -r /etc/sysconfig/gpsd ]; then
- . /etc/sysconfig/gpsd
- GPSD_OPTIONS=$OPTIONS
- GPSD_SOCKET=$CONTROL_SOCKET
-elif [ -r /etc/rc.d/rc.gpsd.conf ]; then
- . /etc/rc.d/rc.gpsd.conf
-fi
-
-if [ -n "$GPSD_OPTIONS" ]; then
- export GPSD_OPTIONS
-fi
-if [ -n "$GPSD_SOCKET" ]; then
- export GPSD_SOCKET
-fi
-
-if [ -n "$USBAUTO" ]; then
- [ "$USBAUTO" = "true" ] || exit 0
-fi
-
-if [ "$ACTION" = "remove" ] ; then
- if echo $DEVLINKS | grep -q /dev/gps; then
- exec /lib/udev/gpsd.hotplug "$ACTION" "$DEVNAME"
- fi
- exit 0
-fi
-
-if [ -x /usr/bin/python ]; then
- exec /lib/udev/gpsd.hotplug "$ACTION" "$DEVNAME"
-fi
-
diff --git a/system/gpsd/gpsd.info b/system/gpsd/gpsd.info
index 861022ad7e..99e1c8e9c5 100644
--- a/system/gpsd/gpsd.info
+++ b/system/gpsd/gpsd.info
@@ -1,10 +1,10 @@
PRGNAM="gpsd"
-VERSION="2.95"
-HOMEPAGE="http://gpsd.berlios.de/"
-DOWNLOAD="http://download.berlios.de/gpsd/gpsd-2.95.tar.gz"
-MD5SUM="12535a9ed9fecf9ea2c5bdc9840da5ae"
+VERSION="3.9"
+HOMEPAGE="http://catb.org/gpsd/"
+DOWNLOAD="http://download-mirror.savannah.gnu.org/releases/gpsd/gpsd-3.9.tar.gz"
+MD5SUM="53a88f24a0973d23427e82e9a8914f19"
DOWNLOAD_x86_64=""
MD5SUM_x86_64=""
-REQUIRES=""
+REQUIRES="scons"
MAINTAINER="David Spencer"
EMAIL="baildon.research@googlemail.com"
diff --git a/system/gpsd/rc.gpsd.new b/system/gpsd/rc.gpsd.new
index 0eee30306a..0db22b9600 100644
--- a/system/gpsd/rc.gpsd.new
+++ b/system/gpsd/rc.gpsd.new
@@ -12,8 +12,9 @@
gpsd_start() {
- if [ ! -x /lib/udev/gpsd.hotplug.wrapper ]; then
- echo "$(basename $0): /lib/udev/gpsd.hotplug.wrapper not found (or not executable); cannot start."
+ if [ ! -x /lib/udev/gpsd.hotplug ]; then
+ echo "$(basename $0): /lib/udev/gpsd.hotplug not found (or not executable); cannot start."
+ exit 1
fi
if [ -r /etc/rc.d/rc.gpsd.conf ]; then
@@ -27,7 +28,7 @@ gpsd_start() {
for DEVNAME in $GPSD_DEVICES; do
if [ -e $DEVNAME ]; then
echo "$(basename $0): Starting gpsd for $DEVNAME"
- ACTION=add DEVNAME=$DEVNAME /lib/udev/gpsd.hotplug.wrapper
+ ACTION=add DEVNAME=$DEVNAME /lib/udev/gpsd.hotplug
else
echo "$(basename $0): $DEVNAME not found, gpsd not started"
fi
diff --git a/system/gpsd/slack-desc b/system/gpsd/slack-desc
index fd614fa133..fe1267ea89 100644
--- a/system/gpsd/slack-desc
+++ b/system/gpsd/slack-desc
@@ -1,9 +1,9 @@
# HOW TO EDIT THIS FILE:
-# The "handy ruler" below makes it easier to edit a package description. Line
-# up the first '|' above the ':' following the base package name, and the '|'
-# on the right side marks the last column you can put a character in. You must
-# make exactly 11 lines for the formatting to be correct. It's also
-# customary to leave one space after the ':'.
+# The "handy ruler" below makes it easier to edit a package description.
+# Line up the first '|' above the ':' following the base package name, and
+# the '|' on the right side marks the last column you can put a character in.
+# You must make exactly 11 lines for the formatting to be correct. It's also
+# customary to leave one space after the ':' except on otherwise blank lines.
|-----handy-ruler------------------------------------------------------|
gpsd: gpsd (GPS service daemon)