diff options
author | David Spencer <baildon.research@googlemail.com> | 2014-02-05 00:01:02 +0700 |
---|---|---|
committer | Erik Hanson <erik@slackbuilds.org> | 2014-02-08 11:10:10 -0600 |
commit | b9fe91a6a6ca4c16369b0867db2e65f51ab39984 (patch) | |
tree | 6527795ca1ccaa3e00a87d4e866ae931fc1a572a /gis | |
parent | 774dab7d85268a94737b5a6bed2e8dc76af48062 (diff) |
gis/gpsd: Updated for version 3.10 + Moved from System category.
Signed-off-by: Willy Sudiarto Raharjo <willysr@slackbuilds.org>
Diffstat (limited to 'gis')
-rw-r--r-- | gis/gpsd/README | 34 | ||||
-rw-r--r-- | gis/gpsd/README.build | 81 | ||||
-rw-r--r-- | gis/gpsd/doinst.sh | 30 | ||||
-rw-r--r-- | gis/gpsd/gpsd.SlackBuild | 145 | ||||
-rw-r--r-- | gis/gpsd/gpsd.info | 10 | ||||
-rw-r--r-- | gis/gpsd/rc.gpsd.conf.new | 14 | ||||
-rw-r--r-- | gis/gpsd/rc.gpsd.new | 61 | ||||
-rw-r--r-- | gis/gpsd/slack-desc | 19 | ||||
-rw-r--r-- | gis/gpsd/xgps.desktop | 9 | ||||
-rw-r--r-- | gis/gpsd/xgpsspeed.desktop | 9 |
10 files changed, 412 insertions, 0 deletions
diff --git a/gis/gpsd/README b/gis/gpsd/README new file mode 100644 index 000000000000..379d93e8bd5c --- /dev/null +++ b/gis/gpsd/README @@ -0,0 +1,34 @@ +gpsd is a service daemon that monitors one or more GPSes attached to +a host computer through serial or USB ports, making all data on the +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, foxtrotgps and Kismet. + +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 four steps: + +1. Copy the file /lib/udev/rules.d/97-gpsd.rules to /etc/udev/rules.d/ + +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 + +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. diff --git a/gis/gpsd/README.build b/gis/gpsd/README.build new file mode 100644 index 000000000000..035973319f9d --- /dev/null +++ b/gis/gpsd/README.build @@ -0,0 +1,81 @@ +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 + +ENABLE="fixed_port_speed=9600,timing" DISABLE="bluez,ipv6" ./gpsd.SlackBuild + +Multiple options may be separated by commas (as shown above) or by spaces. + + +The following features may be enabled (by default they are disabled). + + dbus_export enable DBUS export support + force_global force daemon to listen on all addressses + profiling enable profiling support + squelch enable gpsd_report/gpsd_hexdump suppression (saves cpu) + timing enable latency timing support + 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). + + 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 + leapfetch disable build-time fetch up-to-date leap second data + 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 + 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 + ublox disable u-blox Protocol support + ubx disable UBX Protocol support + usb disable libusb support for USB devices + + +Note that PPS is not supported. Additional userspace tools are required, see + http://www.linuxpps.org/wiki/index.php/LinuxPPS_installation + https://github.com/ago/pps-tools diff --git a/gis/gpsd/doinst.sh b/gis/gpsd/doinst.sh new file mode 100644 index 000000000000..81e9fca8c2eb --- /dev/null +++ b/gis/gpsd/doinst.sh @@ -0,0 +1,30 @@ +config() { + NEW="$1" + OLD="$(dirname $NEW)/$(basename $NEW .new)" + # If there's no config file by that name, mv it over: + if [ ! -r $OLD ]; then + mv $NEW $OLD + elif [ "$(cat $OLD | md5sum)" = "$(cat $NEW | md5sum)" ]; then + # toss the redundant copy + rm $NEW + fi + # Otherwise, we leave the .new copy for the admin to consider... +} + +preserve_perms() { + NEW="$1" + OLD="$(dirname $NEW)/$(basename $NEW .new)" + if [ -e $OLD ]; then + cp -a $OLD ${NEW}.incoming + cat $NEW > ${NEW}.incoming + mv ${NEW}.incoming $NEW + fi + config $NEW +} + +preserve_perms etc/rc.d/rc.gpsd.new +config etc/rc.d/rc.gpsd.conf.new + +if [ -x /usr/bin/update-desktop-database ]; then + /usr/bin/update-desktop-database -q usr/share/applications >/dev/null 2>&1 +fi diff --git a/gis/gpsd/gpsd.SlackBuild b/gis/gpsd/gpsd.SlackBuild new file mode 100644 index 000000000000..d8bf25e8072b --- /dev/null +++ b/gis/gpsd/gpsd.SlackBuild @@ -0,0 +1,145 @@ +#!/bin/sh + +# Slackware build script for gpsd + +# Copyright 2011 David Spencer, Baildon, West Yorkshire, U.K. +# All rights reserved. +# +# Redistribution and use of this script, with or without modification, is +# permitted provided that the following conditions are met: +# +# 1. Redistributions of this script must retain the above copyright +# notice, this list of conditions and the following disclaimer. +# +# THIS SOFTWARE IS PROVIDED BY THE AUTHOR "AS IS" AND ANY EXPRESS OR IMPLIED +# WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF +# MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO +# EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, +# PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; +# OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, +# WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR +# OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF +# ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +PRGNAM=gpsd +VERSION=${VERSION:-3.10} +BUILD=${BUILD:-1} +TAG=${TAG:-_SBo} + +if [ -z "$ARCH" ]; then + case "$( uname -m )" in + i?86) ARCH=i486 ;; + arm*) ARCH=arm ;; + *) ARCH=$( uname -m ) ;; + esac +fi + +CWD=$(pwd) +TMP=${TMP:-/tmp/SBo} +PKG=$TMP/package-$PRGNAM +OUTPUT=${OUTPUT:-/tmp} + +if [ "$ARCH" = "i486" ]; then + SLKCFLAGS="-O2 -march=i486 -mtune=i686" + LIBDIRSUFFIX="" +elif [ "$ARCH" = "i686" ]; then + SLKCFLAGS="-O2 -march=i686 -mtune=i686" + LIBDIRSUFFIX="" +elif [ "$ARCH" = "x86_64" ]; then + SLKCFLAGS="-O2 -fPIC" + LIBDIRSUFFIX="64" +else + SLKCFLAGS="-O2" + LIBDIRSUFFIX="" +fi + +set -e + +ENABLELIST="" +set -- $(echo $ENABLE | sed 's/,/ /g') +while [ "$1" != "" ] +do + case "$1" in + *=* ) + ENABLELIST+=" $1" + ;; + * ) + ENABLELIST+=" $1=yes" + ;; + esac + shift +done +DISABLELIST="" +set -- $(echo $DISABLE | sed 's/,/ /g') +while [ "$1" != "" ] +do + DISABLELIST+=" $1=no" + shift +done + +rm -rf $PKG +mkdir -p $TMP $PKG $OUTPUT +cd $TMP +rm -rf $PRGNAM-$VERSION +tar xvf $CWD/$PRGNAM-$VERSION.tar.gz +cd $PRGNAM-$VERSION +chown -R root:root . +find -L . \ + \( -perm 777 -o -perm 775 -o -perm 750 -o -perm 711 -o -perm 555 \ + -o -perm 511 \) -exec chmod 755 {} \; -o \ + \( -perm 666 -o -perm 664 -o -perm 640 -o -perm 600 -o -perm 444 \ + -o -perm 440 -o -perm 400 \) -exec chmod 644 {} \; + +CFLAGS=$SLKCFLAGS \ +scons \ + prefix=/usr \ + libdir=/usr/lib${LIBDIRSUFFIX} \ + pkgconfigdir=/usr/lib${LIBDIRSUFFIX}/pkgconfig \ + mandir=/usr/man \ + chrpath=no \ + $ENABLELIST \ + $DISABLELIST + +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 + +install -D -m 0644 $CWD/xgps.desktop \ + $PKG/usr/share/applications/xgps.desktop +install -D -m 0644 $CWD/xgpsspeed.desktop \ + $PKG/usr/share/applications/xgpsspeed.desktop +install -D -m 0644 packaging/X11/gpsd-logo.png \ + $PKG/usr/share/pixmaps/gpsd-logo.png + +# 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 +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 + +install -D -m 0644 $CWD/rc.gpsd.new \ + $PKG/etc/rc.d/rc.gpsd.new +install -D -m 0644 $CWD/rc.gpsd.conf.new \ + $PKG/etc/rc.d/rc.gpsd.conf.new + +mkdir -p $PKG/usr/doc/$PRGNAM-$VERSION +cp -a AUTHORS COPYING INSTALL README TODO build.txt $PKG/usr/doc/$PRGNAM-$VERSION +cat $CWD/$PRGNAM.SlackBuild > $PKG/usr/doc/$PRGNAM-$VERSION/$PRGNAM.SlackBuild + +mkdir -p $PKG/install +cat $CWD/slack-desc > $PKG/install/slack-desc +cat $CWD/doinst.sh > $PKG/install/doinst.sh + +cd $PKG +/sbin/makepkg -l y -c n $OUTPUT/$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.${PKGTYPE:-tgz} diff --git a/gis/gpsd/gpsd.info b/gis/gpsd/gpsd.info new file mode 100644 index 000000000000..e88c73934067 --- /dev/null +++ b/gis/gpsd/gpsd.info @@ -0,0 +1,10 @@ +PRGNAM="gpsd" +VERSION="3.10" +HOMEPAGE="http://catb.org/gpsd/" +DOWNLOAD="http://download-mirror.savannah.gnu.org/releases/gpsd/gpsd-3.10.tar.gz" +MD5SUM="fc5b03aae38b9b5b6880b31924d0ace3" +DOWNLOAD_x86_64="" +MD5SUM_x86_64="" +REQUIRES="scons" +MAINTAINER="David Spencer" +EMAIL="baildon.research@googlemail.com" diff --git a/gis/gpsd/rc.gpsd.conf.new b/gis/gpsd/rc.gpsd.conf.new new file mode 100644 index 000000000000..3566b69c0877 --- /dev/null +++ b/gis/gpsd/rc.gpsd.conf.new @@ -0,0 +1,14 @@ +# /etc/rc.d/rc.gpsd.conf +# Configuration settings for gpsd + +# If your GPS is on a real (non-USB) serial port, add /dev/ttyS<n> here, +# for example +# GPSD_DEVICES="/dev/gps* /dev/ttyS1" +GPSD_DEVICES="/dev/gps*" + +# Command line options for the gpsd daemon, see 'man gpsd' for details. +# The most likely options that you might want to set include -b and -n. +GPSD_OPTIONS="" + +# Control socket pathname. It's unlikely you'll want to change this. +GPSD_SOCKET="/var/run/gpsd.sock" diff --git a/gis/gpsd/rc.gpsd.new b/gis/gpsd/rc.gpsd.new new file mode 100644 index 000000000000..0db22b960057 --- /dev/null +++ b/gis/gpsd/rc.gpsd.new @@ -0,0 +1,61 @@ +#!/bin/sh + +# /etc/rc.d/rc.gpsd +# Start/stop/restart gpsd +# Sebastian Arcus and David Spencer +# +# To enable automatic discovery of your GPS device by udev, uncomment the +# appropriate line of /etc/udev/rules.d/97-gpsd.rules +# +# Configuration options may be set in /etc/rc.d/rc.gpsd.conf +# but the defaults will usually be adequate. + +gpsd_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 + . /etc/rc.d/rc.gpsd.conf + fi + # Set config defaults in case the .conf file was absent or bogus + GPSD_DEVICES="${GPSD_DEVICES:-/dev/gps*}" + GPSD_OPTIONS="${GPSD_OPTIONS:-}" + GPSD_SOCKET="${GPSD_SOCKET:-/var/run/gpsd.sock}" + + 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 + else + echo "$(basename $0): $DEVNAME not found, gpsd not started" + fi + done + +} + +gpsd_stop() { + echo "Stopping gpsd..." + killall gpsd >/dev/null 2>&1 + return 0 +} + +case "$1" in + start) + gpsd_start + ;; + stop) + gpsd_stop + ;; + restart) + gpsd_stop + sleep 1 + gpsd_start + ;; + *) + echo "Usage: $0 start|stop|restart" + exit 1 + ;; +esac diff --git a/gis/gpsd/slack-desc b/gis/gpsd/slack-desc new file mode 100644 index 000000000000..fe1267ea8917 --- /dev/null +++ b/gis/gpsd/slack-desc @@ -0,0 +1,19 @@ +# 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 ':' except on otherwise blank lines. + + |-----handy-ruler------------------------------------------------------| +gpsd: gpsd (GPS service daemon) +gpsd: +gpsd: gpsd is a service daemon that monitors one or more GPSes attached to +gpsd: a host computer through serial or USB ports, making all data on the +gpsd: location/course/velocity available to be queried on TCP port 2947 +gpsd: of the host computer. With gpsd, multiple GPS client applications +gpsd: (such as navigational and wardriving software) can share access to +gpsd: GPSes without contention or loss of data. +gpsd: +gpsd: Homepage: http://gpsd.berlios.de/ +gpsd: diff --git a/gis/gpsd/xgps.desktop b/gis/gpsd/xgps.desktop new file mode 100644 index 000000000000..dc61b1264ba1 --- /dev/null +++ b/gis/gpsd/xgps.desktop @@ -0,0 +1,9 @@ +[Desktop Entry] +Name=xgps +GenericName=GPS information +Comment=Display GPS information from a gpsd daemon +Exec=xgps +Icon=/usr/share/pixmaps/gpsd-logo.png +Terminal=false +Type=Application +Categories=Utility; diff --git a/gis/gpsd/xgpsspeed.desktop b/gis/gpsd/xgpsspeed.desktop new file mode 100644 index 000000000000..c327074411ad --- /dev/null +++ b/gis/gpsd/xgpsspeed.desktop @@ -0,0 +1,9 @@ +[Desktop Entry] +Name=xgpsspeed +GenericName=GPS speedometer +Comment=Display GPS speed from a gpsd daemon +Exec=xgpsspeed +Icon=/usr/share/pixmaps/gpsd-logo.png +Terminal=false +Type=Application +Categories=Utility; |