diff options
Diffstat (limited to 'testing/gpsd')
-rw-r--r-- | testing/gpsd/PKGBUILD | 21 | ||||
-rwxr-xr-x | testing/gpsd/gpsd | 19 | ||||
-rw-r--r-- | testing/gpsd/gpsd.conf.d | 5 |
3 files changed, 24 insertions, 21 deletions
diff --git a/testing/gpsd/PKGBUILD b/testing/gpsd/PKGBUILD index d4c1119cd..88fdd571d 100644 --- a/testing/gpsd/PKGBUILD +++ b/testing/gpsd/PKGBUILD @@ -1,4 +1,4 @@ -# $Id: PKGBUILD 135847 2011-08-19 16:38:40Z andrea $ +# $Id: PKGBUILD 135939 2011-08-20 16:11:39Z andrea $ # Maintainer: Andrea Scarpino <andrea@archlinux.org> # Contributor: Sergej Pupykin <pupykin.s+arch@gmail.com> # Contributor: dibblethewrecker dibblethewrecker.at.jiwe.dot.org @@ -6,7 +6,7 @@ pkgname=gpsd pkgver=3.0 -pkgrel=1 +pkgrel=3 pkgdesc="GPS daemon and library to support USB/serial GPS devices" arch=('i686' 'x86_64') url="http://gpsd.berlios.de" @@ -19,9 +19,10 @@ backup=('etc/conf.d/gpsd' 'lib/udev/rules.d/99-gpsd-usb.rules') options=('!libtool' '!buildflags') install="${pkgname}.install" source=("http://download.berlios.de/${pkgname}/${pkgname}-${pkgver}.tar.gz" - 'gpsd') + 'gpsd' 'gpsd.conf.d') md5sums=('c63d41a26868e9bdd48d9e311a9cc42c' - 'e287d4b34a4eb1da27f12533ae9b6dd5') + '1f3402f8e33a7032b9ae6dfd077234f7' + '3e963df3f9f7ef3572ecc648ae829315') build() { cd "${srcdir}/${pkgname}-${pkgver}" @@ -43,15 +44,13 @@ 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 - # 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/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" install -D -m644 "gpsd.rules" "${pkgdir}/lib/udev/rules.d/99-gpsd-usb.rules" @@ -74,5 +73,3 @@ package() { install -D -m644 COPYING "${pkgdir}/usr/share/licenses/${pkgname}/LICENSE" } -md5sums=('c63d41a26868e9bdd48d9e311a9cc42c' - '0d5879df32833ca67a5491ce1ff98dcc') diff --git a/testing/gpsd/gpsd b/testing/gpsd/gpsd index cc8b1ec74..b510a7542 100755 --- a/testing/gpsd/gpsd +++ b/testing/gpsd/gpsd @@ -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/gpsd/$PID.pid &>/dev/null - rm_daemon gpsd - stat_done + rm -f $PIDFILE &>/dev/null + rm_daemon $NAME + stat_done fi ;; 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" |