aboutsummaryrefslogtreecommitdiffstats
path: root/astro
diff options
context:
space:
mode:
authoraraujo <araujo@FreeBSD.org>2007-09-02 04:48:37 +0800
committeraraujo <araujo@FreeBSD.org>2007-09-02 04:48:37 +0800
commit065e28bd6b0271e618a50de9387c4dd4e17d2eba (patch)
treeff99e5ee69ed6311e1da32c788d0a0a6cc6c4a16 /astro
parent4ccbc6ef93a1c45246c9e517c698084dfce05dc3 (diff)
downloadfreebsd-ports-gnome-065e28bd6b0271e618a50de9387c4dd4e17d2eba.tar.gz
freebsd-ports-gnome-065e28bd6b0271e618a50de9387c4dd4e17d2eba.tar.zst
freebsd-ports-gnome-065e28bd6b0271e618a50de9387c4dd4e17d2eba.zip
- Add rc script.
PR: ports/115592 Submitted by: Douglas William Thrift <douglas@dougalshthrift.net> Approved by: stas (mentor), maintainer timeout (2 weeks)
Diffstat (limited to 'astro')
-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"