aboutsummaryrefslogtreecommitdiff
path: root/sysutils/healthd
diff options
context:
space:
mode:
authorPhilip M. Gollucci <pgollucci@FreeBSD.org>2009-07-15 07:14:00 +0000
committerPhilip M. Gollucci <pgollucci@FreeBSD.org>2009-07-15 07:14:00 +0000
commit2515824b44f06789ef65edb9b143d510feb30852 (patch)
tree76f2e38e433b76d25cc8927e12032a19ad334e74 /sysutils/healthd
parentd601e99d0dc98eb625c5cc377bf8e95a5798b439 (diff)
downloadports-2515824b44f06789ef65edb9b143d510feb30852.tar.gz
ports-2515824b44f06789ef65edb9b143d510feb30852.zip
- USE_RC_SUBR != yes
- OPTIONify - Adopt - portlint
Notes
Notes: svn path=/head/; revision=237856
Diffstat (limited to 'sysutils/healthd')
-rw-r--r--sysutils/healthd/Makefile33
-rw-r--r--sysutils/healthd/files/healthd.in36
-rw-r--r--sysutils/healthd/pkg-plist8
3 files changed, 51 insertions, 26 deletions
diff --git a/sysutils/healthd/Makefile b/sysutils/healthd/Makefile
index 5f37b20fbcfc..3c6a1b5f9b60 100644
--- a/sysutils/healthd/Makefile
+++ b/sysutils/healthd/Makefile
@@ -7,38 +7,34 @@
PORTNAME= healthd
PORTVERSION= 0.7.9
-PORTREVISION= 1
+PORTREVISION= 2
CATEGORIES= sysutils ipv6
MASTER_SITES= http://healthd.thehousleys.net/ \
http://healthd1.thehousleys.net/
-MAINTAINER= ports@FreeBSD.org
+MAINTAINER= pgolluccis@FreeBSD.org
COMMENT= A daemon to monitor vital motherboard parameters
-ONLY_FOR_ARCHS= i386 amd64
+OPTIONS= IPV6 "IPv6 support" off \
+ FULL_CONFIG "Full Config support" off
+ONLY_FOR_ARCHS= i386 amd64
+USE_RC_SUBR= ${PORTNAME}
GNU_CONFIGURE= yes
CONFIGURE_ARGS= --exec-prefix=${PREFIX}
-#
-# To allow reading the doWarn and doFail scripts remotely uncomment
-# the following line. Enabling the following option might provide
-# information about the configuration of you system.
-#CONFIGURE_ARGS+= --enable-full-config
MAN8= healthd.8 healthdc.8
INSTALL_TARGET= install-all
-HDDOCDIR= ${PREFIX}/share/doc/healthd
-
.if defined(WITHOUT_IPV6)
CONFIGURE_ARGS+= --disable-ipv6
.endif
-USE_RC_SUBR= yes
+.if defined(WITH_FULL_CONFIG)
+CONFIGURE_ARGS+= --enable-full-config
+.endif
post-install:
- @${REINPLACE_CMD} -e 's|/usr/local/etc/rc.subr|${RC_SUBR}|' ${WRKSRC}/healthd.sh
- ${INSTALL_SCRIPT} -m 751 ${WRKSRC}/healthd.sh ${PREFIX}/etc/rc.d/healthd.sh
@if [ ! -f ${PREFIX}/etc/healthd.conf ]; then \
${ECHO} "Installing ${PREFIX}/etc/healthd.conf configuration file."; \
${ECHO} "It is recommended you edit this file to match your system"; \
@@ -46,14 +42,9 @@ post-install:
${CP} ${PREFIX}/etc/healthd.conf.sample ${PREFIX}/etc/healthd.conf; \
fi
.if !defined(NOPORTDOCS)
- @if ! [ -d ${HDDOCDIR} ]; then ${MKDIR} ${HDDOCDIR}; fi
- ${INSTALL_DATA} ${WRKSRC}/README ${HDDOCDIR}
- ${INSTALL_DATA} ${WRKSRC}/PROTOCOL ${HDDOCDIR}
-.endif
-
-pre-everything::
-.ifndef (WITHOUT_IPV6)
- @${ECHO_MSG} "WITHOUT_IPV6=yes builds without IPv6 support"
+ @${MKDIR} ${DOCSDIR}/
+ ${INSTALL_DATA} ${WRKSRC}/README ${DOCSDIR}/
+ ${INSTALL_DATA} ${WRKSRC}/PROTOCOL ${DOCSDIR}/
.endif
.include <bsd.port.mk>
diff --git a/sysutils/healthd/files/healthd.in b/sysutils/healthd/files/healthd.in
new file mode 100644
index 000000000000..16dc089af802
--- /dev/null
+++ b/sysutils/healthd/files/healthd.in
@@ -0,0 +1,36 @@
+#!/bin/sh
+#
+# $Id: healthd.sh,v 1.1.2.7 2004/06/23 14:11:57 housley Exp $
+#
+
+# PROVIDE: healthd
+# REQUIRE: LOGIN
+# KEYWORD: FreeBSD shutdown
+
+#
+# Add the following line to /etc/rc.conf to enable healthd:
+#
+#healthd_enable="YES"
+#
+# For IPv4 only operation add the following line to /etc/rc.conf:
+#
+#healthd_flags="-6"
+#
+# Other options are listed in healthd(8)
+#
+
+. %%RC_SUBR%%
+
+name=healthd
+rcvar=`set_rcvar`
+
+extra_commands="reload"
+command=%%PREFIX%%/sbin/healthd
+required_files=%%PREFIX%%/etc/${name}.conf
+
+load_rc_config ${name}
+
+healthd_enable=${healthd_enable:-"NO"}
+healthd_flags=${healthd_flags:-""}
+
+run_rc_command "$1"
diff --git a/sysutils/healthd/pkg-plist b/sysutils/healthd/pkg-plist
index 0a8903a9da1e..9cf9b12cf84d 100644
--- a/sysutils/healthd/pkg-plist
+++ b/sysutils/healthd/pkg-plist
@@ -3,8 +3,6 @@ sbin/healthd
@unexec if cmp -s %D/etc/healthd.conf %D/etc/healthd.conf.sample; then rm -f %D/etc/healthd.conf; fi
etc/healthd.conf.sample
@exec if [ ! -f %D/etc/healthd.conf ]; then cp -p %D/%F %B/healthd.conf; fi
-@unexec if cmp -s %D/etc/rc.d/healthd.sh %D/etc/rc.d/healthd.sh.sample; then rm -f %D/etc/rc.d/healthd.sh; fi
-etc/rc.d/healthd.sh
-%%PORTDOCS%%share/doc/healthd/README
-%%PORTDOCS%%share/doc/healthd/PROTOCOL
-%%PORTDOCS%%@dirrm share/doc/healthd
+%%PORTDOCS%%%%DOCSDIR%%/README
+%%PORTDOCS%%%%DOCSDIR%%/PROTOCOL
+%%PORTDOCS%%@dirrm %%DOCSDIR%%