From f79044c153c49beb4e9fcf8668eb3337cdaf0154 Mon Sep 17 00:00:00 2001 From: Manuel Date: Sun, 8 Apr 2012 22:24:04 +0000 Subject: [PATCH] Update gpsd --- support-pkg-gpsd/LICENSE | 38 ---------------- support-pkg-gpsd/PKGBUILD | 85 ++++++++++++++++++------------------ support-pkg-gpsd/gpsd | 21 ++++----- support-pkg-gpsd/gpsd.conf.d | 5 +++ 4 files changed, 59 insertions(+), 90 deletions(-) delete mode 100644 support-pkg-gpsd/LICENSE mode change 100755 => 100644 support-pkg-gpsd/gpsd create mode 100644 support-pkg-gpsd/gpsd.conf.d diff --git a/support-pkg-gpsd/LICENSE b/support-pkg-gpsd/LICENSE deleted file mode 100644 index 076538678..000000000 --- a/support-pkg-gpsd/LICENSE +++ /dev/null @@ -1,38 +0,0 @@ - COPYRIGHTS - -Compilation copyright is held by the GPSD project. All rights reserved. - -GPSD project copyrights are assigned to the project lead, currently -Eric S. Raymond. Other portions of the GPSD code are Copyright (c) -1997, 1998, 1999, 2000, 2001, 2002 by Remco Treffkorn, and others -Copyright (c) 2005 by Eric S. Raymond. For other copyrights, see -individual files. - - BSD LICENSE - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions -are met:

- -Redistributions of source code must retain the above copyright -notice, this list of conditions and the following disclaimer.

- -Redistributions in binary form must reproduce the above copyright -notice, this list of conditions and the following disclaimer in the -documentation and/or other materials provided with the distribution.

- -Neither name of the GPSD project nor the names of its contributors -may be used to endorse or promote products derived from this software -without specific prior written permission. - -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -``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 REGENTS OR -CONTRIBUTORS 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. diff --git a/support-pkg-gpsd/PKGBUILD b/support-pkg-gpsd/PKGBUILD index c3efa2119..dd8658131 100644 --- a/support-pkg-gpsd/PKGBUILD +++ b/support-pkg-gpsd/PKGBUILD @@ -1,45 +1,46 @@ # # KDE SC Packages for Chakra, part of chakra-project.org # -# maintainer (i686): Phil Miller # maintainer (x86_64): Manuel Tortosa pkgname=gpsd -pkgver=2.95 +pkgver=3.4 pkgrel=1 pkgdesc="GPS daemon and library to support USB/serial GPS devices" arch=('i686' 'x86_64') -url="http://gpsd.berlios.de" +url="http://catb.org/gpsd/" +screenshot="http://www.catb.org/gpsd/gpsd2.png" license=('BSD') -depends=('lesstif' 'libxaw' 'python2' 'pth' 'libusb' 'desktop-file-utils') +depends=('python2' 'libusb' 'bluez' 'desktop-file-utils') optdepends=('php: generate a PHP status page for your GPS' - 'php-gd: image support for the PHP status page') -makedepends=('docbook-xsl') -backup=('etc/conf.d/gpsd' 'lib/udev/rules.d/99-gpsd-usb.rules') + 'php-gd: image support for the PHP status page' + 'pygtk: GUI frontends') +makedepends=('scons' 'docbook-xsl' 'chrpath') +backup=('etc/conf.d/gpsd') options=('!libtool') install="${pkgname}.install" -source=("http://download.berlios.de/${pkgname}/${pkgname}-${pkgver}.tar.gz" - 'gpsd' 'LICENSE') -md5sums=('12535a9ed9fecf9ea2c5bdc9840da5ae' - 'f929322fc4670543fcb36dafc7bb9e03' - 'd217a23f408e91c94359447735bc1800') +source=("http://download.savannah.gnu.org/releases/${pkgname}/${pkgname}-${pkgver}.tar.gz"{,.sig} + 'gpsd' 'gpsd.conf.d') +md5sums=('c01353459faa68834309109d4e868460' + '8aea27e1b0c23f254f94861f7d898106' + '1f3402f8e33a7032b9ae6dfd077234f7' + '3e963df3f9f7ef3572ecc648ae829315') build() { cd "${srcdir}/${pkgname}-${pkgver}" - # install python to the same DESTDIR given make - sed -i 's|--prefix=${prefix} # --root=$(DESTDIR)|--prefix=${prefix} --root=$(DESTDIR)|' Makefile.am Makefile.in - # fix python 2.7 path - sed -i 's|/usr/bin/python|/usr/bin/python2|' gpsd.hotplug{,.wrapper} - sed -i 's|/usr/bin/python2.6|/usr/bin/python2|' valgrind-audit - sed -i 's|/usr/bin/env python|/usr/bin/env python2|' gpscat \ - gpsfake gpsprof xgps xgpsspeed gps/gps.py - - PYTHON=/usr/bin/python2 ./configure --prefix=/usr \ - --disable-libQgpsmm \ - --disable-static - make + sed -i -e "s|#![ ]*/usr/bin/python$|#!/usr/bin/python2|" \ + -e "s|#![ ]*/usr/bin/env python$|#!/usr/bin/env python2|" \ + $(find . -name '*.py') + sed -i 's|/usr/bin/env python|/usr/bin/env python2|' gegps \ + gpscat gpsfake gpsprof xgps xgpsspeed + + scons prefix=/usr \ + systemd=yes \ + libQgpsmm=no \ + PYTHONPATH=/usr/bin/python2 + scons build } package() { @@ -48,30 +49,30 @@ package() { # Fix man pages path (FS#21715) sed -i 's|.so gps.1|.so man1/gps.1|' cgps.1 lcdgps.1 xgps.1 xgpsspeed.1 - make DESTDIR="${pkgdir}" install + export DESTDIR="${pkgdir}" + scons install - # Our own udev-install since the Makefile uses absolute paths - # Original file names are [mostly] unmodified: useful to match process name in case of error - # Following the switch from hotplug to udev helper scripts now live in /lib/udev/ instead of /etc/hotplug/ - sed -i 's|GPSD_OPTIONS=""|GPSD_OPTIONS="-P /var/run/gpsd.pid"|' packaging/deb/etc_default_gpsd - sed -i 's|"/var/run/gpsd.sock"|"/var/run/gpsd/gpsd.sock"|' packaging/deb/etc_default_gpsd - install -D -m644 "packaging/deb/etc_default_gpsd" "${pkgdir}/etc/conf.d/gpsd" + install -D -m644 "${srcdir}/gpsd.conf.d" "${pkgdir}/etc/conf.d/gpsd" - sed -i 's|Id: gpsd.rules|Id: 99-gpsd-usb.rules|' gpsd.rules - install -D -m644 "gpsd.rules" "${pkgdir}/lib/udev/rules.d/99-gpsd-usb.rules" + install -D -m644 "gpsd.rules" "${pkgdir}/usr/lib/udev/rules.d/99-gpsd-usb.rules" - sed -i 's|/etc/default/gpsd|/etc/conf.d/gpsd|' gpsd.hotplug.wrapper - install -D -m755 gpsd.hotplug.wrapper "${pkgdir}/lib/udev/gpsd.hotplug.wrapper" + sed -i 's|/etc/default/gpsd|/etc/conf.d/gpsd|' gpsd.hotplug + install -D -m755 gpsd.hotplug "${pkgdir}/usr/lib/udev/gpsd.hotplug" - # Patch a path bug. Check to see if fixed in ensuing releases - sed -i 's|gpsdcmd = "gpsd %s|gpsdcmd = "/usr/sbin/gpsd %s|' gpsd.hotplug - install -D -m755 gpsd.hotplug "${pkgdir}/lib/udev/gpsd.hotplug" + # GPSD needs RPATH + chrpath -r /usr/lib/ "${pkgdir}"/usr/lib/libgps{,d}.so.20.0.0 + chrpath -r /usr/lib/ "${pkgdir}"/usr/bin/{gpsdecode,gpsctl,gpspipe,gpxlogger,lcdgps} + chrpath -r /usr/lib/ "${pkgdir}"/usr/sbin/{gpsd,gpsdctl} + chrpath -r /usr/lib/ "${pkgdir}"/usr/lib/python2.7/site-packages/gps/{clienthelpers,packet}.so - install -D -m644 packaging/X11/xgps.desktop ${pkgdir}/usr/share/applications/xgps.desktop - install -D -m644 packaging/X11/xgpsspeed.desktop ${pkgdir}/usr/share/applications/xgpsspeed.desktop - install -D -m644 packaging/X11/gpsd-logo.png ${pkgdir}/usr/share/gpsd/gpsd-logo.png + install -D -m644 packaging/X11/xgps.desktop \ + "${pkgdir}/usr/share/applications/xgps.desktop" + install -D -m644 packaging/X11/xgpsspeed.desktop \ + "${pkgdir}/usr/share/applications/xgpsspeed.desktop" + install -D -m644 packaging/X11/gpsd-logo.png \ + "${pkgdir}/usr/share/gpsd/gpsd-logo.png" install -D -m755 "${srcdir}/gpsd" "${pkgdir}/etc/rc.d/gpsd" - install -D -m644 "${srcdir}/LICENSE" "${pkgdir}/usr/share/licenses/${pkgname}/LICENSE" + install -D -m644 COPYING "${pkgdir}/usr/share/licenses/${pkgname}/LICENSE" } diff --git a/support-pkg-gpsd/gpsd b/support-pkg-gpsd/gpsd old mode 100755 new mode 100644 index b0f22c735..b510a7542 --- a/support-pkg-gpsd/gpsd +++ b/support-pkg-gpsd/gpsd @@ -1,4 +1,4 @@ -#! /bin/sh +#!/bin/bash . /etc/rc.conf . /etc/rc.d/functions @@ -6,29 +6,30 @@ NAME=gpsd DAEMON=/usr/sbin/$NAME -PID=$(pidof -o %PPID /usr/sbin/gpsd) +PIDFILE=/var/run/$NAME/$NAME.pid +PID=$(cat $PIDFILE 2>/dev/null) case "$1" in start) - stat_busy "Starting gpsd" - [ ! -d /var/run/gpsd ] && install -d /var/run/gpsd - [ -z "$PID" ] && "$DAEMON" ${GPSD_OPTIONS} -F ${GPSD_SOCKET} ${DEVICES} + stat_busy "Starting $NAME" + [ ! -d /var/run/$NAME ] && install -d /var/run/$NAME + [ -z "$PID" ] && "$DAEMON" -P $PIDFILE -F /var/run/$NAME/$NAME.sock ${GPSD_OPTIONS} ${DEVICES} if [ $? -gt 0 ]; then stat_fail else - add_daemon gpsd + add_daemon $NAME stat_done fi ;; stop) - stat_busy "Stopping gpsd" + stat_busy "Stopping $NAME" [ ! -z "$PID" ] && kill $PID &> /dev/null if [ $? -gt 0 ]; then stat_fail else - rm -f /var/run/$PID.pid &>/dev/null - rm_daemon gpsd - stat_done + rm -f $PIDFILE &>/dev/null + rm_daemon $NAME + stat_done fi ;; diff --git a/support-pkg-gpsd/gpsd.conf.d b/support-pkg-gpsd/gpsd.conf.d new file mode 100644 index 000000000..9fef72cb9 --- /dev/null +++ b/support-pkg-gpsd/gpsd.conf.d @@ -0,0 +1,5 @@ +# Default settings for gpsd. +START_DAEMON="true" +GPSD_OPTIONS="" +DEVICES="" +USBAUTO="true"