[arch-commits] Commit in gpsd/trunk (PKGBUILD gpsd gpsd.conf.d)

Andrea Scarpino andrea at archlinux.org
Sat Aug 20 10:14:37 UTC 2011


    Date: Saturday, August 20, 2011 @ 06:14:36
  Author: andrea
Revision: 135927

Fix man pages again; use our gpsd conf.d file; rc.d script updated/cleanup

Added:
  gpsd/trunk/gpsd.conf.d
Modified:
  gpsd/trunk/PKGBUILD
  gpsd/trunk/gpsd

-------------+
 PKGBUILD    |   19 ++++++++-----------
 gpsd        |   19 ++++++++++---------
 gpsd.conf.d |    5 +++++
 3 files changed, 23 insertions(+), 20 deletions(-)

Modified: PKGBUILD
===================================================================
--- PKGBUILD	2011-08-20 07:14:30 UTC (rev 135926)
+++ PKGBUILD	2011-08-20 10:14:36 UTC (rev 135927)
@@ -6,7 +6,7 @@
 
 pkgname=gpsd
 pkgver=3.0
-pkgrel=1
+pkgrel=2
 pkgdesc="GPS daemon and library to support USB/serial GPS devices"
 arch=('i686' 'x86_64')
 url="http://gpsd.berlios.de"
@@ -19,9 +19,10 @@
 options=('!libtool' '!buildflags')
 install="${pkgname}.install"
 source=("http://download.berlios.de/${pkgname}/${pkgname}-${pkgver}.tar.gz"
-        'gpsd')
+        'gpsd' 'gpsd.conf.d')
 md5sums=('c63d41a26868e9bdd48d9e311a9cc42c'
-         'e287d4b34a4eb1da27f12533ae9b6dd5')
+         'ffa9325cb53bf900b76d064b03ff71b7'
+         '5ebad060285f400fd202aef8fd5ed2a9')
 
 build() {
   cd "${srcdir}/${pkgname}-${pkgver}"
@@ -43,15 +44,13 @@
 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 @@
 
   install -D -m644 COPYING "${pkgdir}/usr/share/licenses/${pkgname}/LICENSE"
 }
-md5sums=('c63d41a26868e9bdd48d9e311a9cc42c'
-         '0d5879df32833ca67a5491ce1ff98dcc')

Modified: gpsd
===================================================================
--- gpsd	2011-08-20 07:14:30 UTC (rev 135926)
+++ gpsd	2011-08-20 10:14:36 UTC (rev 135927)
@@ -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 ${OPTIONS} ${DEVICE}
 	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
    ;;
 

Added: gpsd.conf.d
===================================================================
--- gpsd.conf.d	                        (rev 0)
+++ gpsd.conf.d	2011-08-20 10:14:36 UTC (rev 135927)
@@ -0,0 +1,5 @@
+# Default settings for gpsd.
+START_DAEMON="true"
+OPTIONS=""
+DEVICE=""
+USBAUTO="true"




More information about the arch-commits mailing list