summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTomas Chvatal <scarabeus@gentoo.org>2010-09-26 13:36:50 +0000
committerTomas Chvatal <scarabeus@gentoo.org>2010-09-26 13:36:50 +0000
commit3d1faceaf118dc380894742b5b740ee7c4114f70 (patch)
tree6559554881eb85db99f3c66f8c12172f8e91bcad /sci-geosciences/gpsd/files
parenttemporarily fix bug 336801 by depending on cairo[-qt4] (diff)
downloadgentoo-2-3d1faceaf118dc380894742b5b740ee7c4114f70.tar.gz
gentoo-2-3d1faceaf118dc380894742b5b740ee7c4114f70.tar.bz2
gentoo-2-3d1faceaf118dc380894742b5b740ee7c4114f70.zip
Version bump to latest. This is only basic ebuild and generic tested. Might need enhancement/touchups.
(Portage version: 2.2_rc87/cvs/Linux x86_64)
Diffstat (limited to 'sci-geosciences/gpsd/files')
-rw-r--r--sci-geosciences/gpsd/files/gpsd.conf-28
-rwxr-xr-xsci-geosciences/gpsd/files/gpsd.init-238
2 files changed, 46 insertions, 0 deletions
diff --git a/sci-geosciences/gpsd/files/gpsd.conf-2 b/sci-geosciences/gpsd/files/gpsd.conf-2
new file mode 100644
index 000000000000..b50bd46b0199
--- /dev/null
+++ b/sci-geosciences/gpsd/files/gpsd.conf-2
@@ -0,0 +1,8 @@
+# Copyright 1999-2010 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/sci-geosciences/gpsd/files/gpsd.conf-2,v 1.1 2010/09/26 13:36:50 scarabeus Exp $
+
+# Config file for gpsd server
+GPSD_OPTIONS=""
+DEVICES=""
+GPSD_SOCKET="/var/run/gpsd.sock"
diff --git a/sci-geosciences/gpsd/files/gpsd.init-2 b/sci-geosciences/gpsd/files/gpsd.init-2
new file mode 100755
index 000000000000..7a09664bfb7b
--- /dev/null
+++ b/sci-geosciences/gpsd/files/gpsd.init-2
@@ -0,0 +1,38 @@
+#!/sbin/runscript
+# Copyright 1999-2010 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/sci-geosciences/gpsd/files/gpsd.init-2,v 1.1 2010/09/26 13:36:50 scarabeus Exp $
+
+depend() {
+ after dbus
+ before ntpd
+}
+
+PIDFILE=/var/run/$NAME.pid
+DAEMON=/usr/sbin/gpsd
+
+checkconfig() {
+ if [ -z "${GPSD_SOCKET}" ] && [ -z "${DEVICES}" ]; then
+ GPSD_SOCKET="/var/run/gpsd.sock"
+ fi
+
+ if [ -n "${GPSD_SOCKET}" ]; then
+ GPSD_OPTIONS="${GPSD_OPTIONS} -F ${GPSD_SOCKET}"
+ fi
+}
+
+start() {
+ checkconfig
+ ebegin "Starting gpsd"
+
+ start-stop-daemon --start --quiet --pidfile ${PIDFILE} --exec ${DAEMON} -- \
+ ${GPSD_OPTIONS} -P ${PIDFILE} ${DEVICES}
+ eend $?
+}
+
+stop() {
+ ebegin "Stopping gpsd"
+ start-stop-daemon --stop --quiet --retry=TERM/30/KILL/5 --pidfile ${PIDFILE}
+ eend $?
+ rm -f ${PIDFILE}
+}