summaryrefslogtreecommitdiff
path: root/testing/gpsd
diff options
context:
space:
mode:
authorNicolas Reynolds <fauno@kiwwwi.com.ar>2012-02-10 10:21:53 -0300
committerNicolas Reynolds <fauno@kiwwwi.com.ar>2012-02-10 10:21:53 -0300
commit9268c5eeb9d68cd786f5a7beaed3b5672adb5287 (patch)
treea9c2e47a6d2ce00fda6c302e09aba390accc1407 /testing/gpsd
parent96790e4d7e2c3a76ee2ee0c5d703b8144049532c (diff)
parent4bc61018eec54dbe50e7556ce01d2ef2859b2c9f (diff)
Merge branch 'master' of ssh://vparabola/home/parabola/abslibre-pre-mips64el
Conflicts: community-testing/blender/PKGBUILD community-testing/gambas2/PKGBUILD community-testing/gambas3/PKGBUILD community-testing/root/PKGBUILD community-testing/ted/PKGBUILD extra/cpufrequtils/PKGBUILD extra/libraw1394/PKGBUILD extra/musicbrainz/PKGBUILD extra/pm-utils/PKGBUILD extra/re2c/PKGBUILD extra/zip/PKGBUILD multilib/lib32-expat/PKGBUILD multilib/lib32-flac/PKGBUILD multilib/lib32-fontconfig/PKGBUILD multilib/lib32-giflib/PKGBUILD multilib/lib32-glew/PKGBUILD multilib/lib32-glib/PKGBUILD multilib/lib32-json-c/PKGBUILD multilib/lib32-lcms/PKGBUILD multilib/lib32-libao/PKGBUILD multilib/lib32-libasyncns/PKGBUILD multilib/lib32-libcups/PKGBUILD multilib/lib32-libice/PKGBUILD multilib/lib32-libmikmod/PKGBUILD multilib/lib32-libsm/PKGBUILD multilib/lib32-libsndfile/PKGBUILD multilib/lib32-libstdc++5/PKGBUILD multilib/lib32-libvorbis/PKGBUILD multilib/lib32-libxau/PKGBUILD multilib/lib32-libxcomposite/PKGBUILD multilib/lib32-libxdamage/PKGBUILD multilib/lib32-libxdmcp/PKGBUILD multilib/lib32-libxft/PKGBUILD multilib/lib32-libxinerama/PKGBUILD multilib/lib32-libxml2/PKGBUILD multilib/lib32-libxmu/PKGBUILD multilib/lib32-libxrender/PKGBUILD multilib/lib32-libxss/PKGBUILD multilib/lib32-libxt/PKGBUILD multilib/lib32-libxtst/PKGBUILD multilib/lib32-libxv/PKGBUILD multilib/lib32-libxvmc/PKGBUILD multilib/lib32-libxxf86vm/PKGBUILD multilib/lib32-mesa/PKGBUILD multilib/lib32-openal/PKGBUILD multilib/lib32-speex/PKGBUILD testing/kdelibs3/PKGBUILD testing/kmod/PKGBUILD testing/php/PKGBUILD testing/systemd/PKGBUILD
Diffstat (limited to 'testing/gpsd')
-rw-r--r--testing/gpsd/PKGBUILD78
-rwxr-xr-xtesting/gpsd/gpsd44
-rw-r--r--testing/gpsd/gpsd.conf.d5
-rw-r--r--testing/gpsd/gpsd.install16
4 files changed, 143 insertions, 0 deletions
diff --git a/testing/gpsd/PKGBUILD b/testing/gpsd/PKGBUILD
new file mode 100644
index 000000000..b7a55e671
--- /dev/null
+++ b/testing/gpsd/PKGBUILD
@@ -0,0 +1,78 @@
+# $Id: PKGBUILD 149489 2012-02-08 10:18:41Z andrea $
+# Maintainer:
+# Contributor: Andrea Scarpino <andrea@archlinux.org>
+# Contributor: Sergej Pupykin <pupykin.s+arch@gmail.com>
+# Contributor: Giacomo Rizzo <alt@free-os.it>
+
+pkgname=gpsd
+pkgver=3.4
+pkgrel=1
+pkgdesc="GPS daemon and library to support USB/serial GPS devices"
+arch=('i686' 'x86_64')
+url="http://catb.org/gpsd/"
+license=('BSD')
+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'
+ 'pygtk: GUI frontends')
+makedepends=('scons' 'docbook-xsl' 'chrpath')
+backup=('etc/conf.d/gpsd' 'lib/udev/rules.d/99-gpsd-usb.rules')
+options=('!libtool')
+install="${pkgname}.install"
+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}"
+
+ # fix python 2.7 path
+ 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() {
+ cd "${srcdir}/${pkgname}-${pkgver}"
+
+ # Fix man pages path (FS#21715)
+ sed -i 's|.so gps.1|.so man1/gps.1|' cgps.1 lcdgps.1 xgps.1 xgpsspeed.1
+
+ export DESTDIR="${pkgdir}"
+ scons install
+
+ install -D -m644 "${srcdir}/gpsd.conf.d" "${pkgdir}/etc/conf.d/gpsd"
+
+ install -D -m644 "gpsd.rules" "${pkgdir}/lib/udev/rules.d/99-gpsd-usb.rules"
+
+ sed -i 's|/etc/default/gpsd|/etc/conf.d/gpsd|' 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 -m755 "${srcdir}/gpsd" "${pkgdir}/etc/rc.d/gpsd"
+
+ install -D -m644 COPYING "${pkgdir}/usr/share/licenses/${pkgname}/LICENSE"
+}
diff --git a/testing/gpsd/gpsd b/testing/gpsd/gpsd
new file mode 100755
index 000000000..b510a7542
--- /dev/null
+++ b/testing/gpsd/gpsd
@@ -0,0 +1,44 @@
+#!/bin/bash
+
+. /etc/rc.conf
+. /etc/rc.d/functions
+[ -f /etc/conf.d/gpsd ] && . /etc/conf.d/gpsd
+
+NAME=gpsd
+DAEMON=/usr/sbin/$NAME
+PIDFILE=/var/run/$NAME/$NAME.pid
+PID=$(cat $PIDFILE 2>/dev/null)
+
+case "$1" in
+ start)
+ 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 $NAME
+ stat_done
+ fi
+ ;;
+ stop)
+ stat_busy "Stopping $NAME"
+ [ ! -z "$PID" ] && kill $PID &> /dev/null
+ if [ $? -gt 0 ]; then
+ stat_fail
+ else
+ rm -f $PIDFILE &>/dev/null
+ rm_daemon $NAME
+ stat_done
+ fi
+ ;;
+
+ restart)
+ $0 stop
+ sleep 2
+ $0 start
+ ;;
+ *)
+ echo "usage: $0 {start|stop|restart}"
+esac
+exit 0
diff --git a/testing/gpsd/gpsd.conf.d b/testing/gpsd/gpsd.conf.d
new file mode 100644
index 000000000..9fef72cb9
--- /dev/null
+++ b/testing/gpsd/gpsd.conf.d
@@ -0,0 +1,5 @@
+# Default settings for gpsd.
+START_DAEMON="true"
+GPSD_OPTIONS=""
+DEVICES=""
+USBAUTO="true"
diff --git a/testing/gpsd/gpsd.install b/testing/gpsd/gpsd.install
new file mode 100644
index 000000000..ee661fcb1
--- /dev/null
+++ b/testing/gpsd/gpsd.install
@@ -0,0 +1,16 @@
+post_install() {
+ echo ">>> Note: the supplied gpsd udev rules are device-specific, so"
+ echo ">>> if your device isn't detected correctly, please use lsusb or"
+ echo ">>> another suitable tool to determine the proper device IDs and"
+ echo ">>> use the commented rules to fill in the blanks for your device."
+
+ update-desktop-database -q
+}
+
+post_upgrade() {
+ update-desktop-database -q
+}
+
+post_remove() {
+ update-desktop-database -q
+}