aboutsummaryrefslogtreecommitdiff
path: root/astro/gpsd
diff options
context:
space:
mode:
authorMarcelo Araujo <araujo@FreeBSD.org>2007-09-01 20:48:37 +0000
committerMarcelo Araujo <araujo@FreeBSD.org>2007-09-01 20:48:37 +0000
commitc0c124c8929e32d58e4b4e850175b90f01c8ad54 (patch)
treec330d4d2f2246185a1616669cf2c202be5e2135d /astro/gpsd
parentbae47a496f5c5cfa5b15f83b75c4e256c00e92ba (diff)
downloadports-c0c124c8929e32d58e4b4e850175b90f01c8ad54.tar.gz
ports-c0c124c8929e32d58e4b4e850175b90f01c8ad54.zip
Notes
Diffstat (limited to 'astro/gpsd')
-rw-r--r--astro/gpsd/Makefile3
-rw-r--r--astro/gpsd/files/gpsd.in40
2 files changed, 42 insertions, 1 deletions
diff --git a/astro/gpsd/Makefile b/astro/gpsd/Makefile
index 6840277637d2..3e1eb4b6612e 100644
--- a/astro/gpsd/Makefile
+++ b/astro/gpsd/Makefile
@@ -7,7 +7,7 @@
PORTNAME= gpsd
PORTVERSION= 2.32
-PORTREVISION= 1
+PORTREVISION= 3
CATEGORIES= astro geography
MASTER_SITES= ${MASTER_SITE_BERLIOS}
MASTER_SITE_SUBDIR= ${PORTNAME}
@@ -15,6 +15,7 @@ MASTER_SITE_SUBDIR= ${PORTNAME}
MAINTAINER= toxa@toxahost.ru
COMMENT= Daemon that monitors one or more GPSes attached to a host computer
+USE_RC_SUBR= gpsd
USE_AUTOTOOLS= libtool:15
GNU_CONFIGURE= yes
USE_LDCONFIG= yes
diff --git a/astro/gpsd/files/gpsd.in b/astro/gpsd/files/gpsd.in
new file mode 100644
index 000000000000..ef36a41829e4
--- /dev/null
+++ b/astro/gpsd/files/gpsd.in
@@ -0,0 +1,40 @@
+#!/bin/sh
+#
+# $FreeBSD$
+#
+
+# PROVIDE: gpsd
+# REQUIRE: NETWORKING DAEMON cleanvar devfs
+# BEFORE: ntpd
+# KEYWORD: shutdown
+
+#
+# Add the following lines to /etc/rc.conf to enable gpsd:
+#
+# gpsd_enable (bool): Set to "NO" by default.
+# Set it to "YES" to enable gpsd.
+#
+# gpsd_flags (str): Set to "" by default.
+# See gpsd(8) for flags.
+#
+# gpsd_devices (str): Set to "" by default.
+# Example: "/dev/cuaU0" for a USB serial GPS.
+#
+
+. %%RC_SUBR%%
+
+name=gpsd
+rcvar=`set_rcvar`
+
+load_rc_config $name
+
+# Set defaults
+: ${gpsd_enable:="NO"}
+: ${gpsd_flags:=""}
+: ${gpsd_devices:=""}
+
+pidfile=/var/run/$name.pid
+command=%%PREFIX%%/sbin/$name
+command_args="-P $pidfile $gpsd_devices"
+
+run_rc_command "$1"