From bc8ecab0f46c5b900e7724911acc01bda53a3bf6 Mon Sep 17 00:00:00 2001 From: Pav Lucistnik Date: Tue, 17 Aug 2004 09:25:37 +0000 Subject: Add openupsd, a UPS daemon, pretty specific to those Belkin serial-connected UPS's that speak the "regulator pro smart protocol". This daemon is monitoring only, at the moment anyway. PR: ports/70490 Submitted by: Tim Bishop --- sysutils/Makefile | 1 + sysutils/openupsd/Makefile | 30 ++++++++++++++++++++++++++++++ sysutils/openupsd/distinfo | 2 ++ sysutils/openupsd/files/openupsd.sh | 30 ++++++++++++++++++++++++++++++ sysutils/openupsd/files/patch-support.c | 10 ++++++++++ sysutils/openupsd/pkg-descr | 5 +++++ 6 files changed, 78 insertions(+) create mode 100644 sysutils/openupsd/Makefile create mode 100644 sysutils/openupsd/distinfo create mode 100644 sysutils/openupsd/files/openupsd.sh create mode 100644 sysutils/openupsd/files/patch-support.c create mode 100644 sysutils/openupsd/pkg-descr (limited to 'sysutils') diff --git a/sysutils/Makefile b/sysutils/Makefile index 489aa4422313..8d283377ee7b 100644 --- a/sysutils/Makefile +++ b/sysutils/Makefile @@ -264,6 +264,7 @@ SUBDIR += nwclient602 SUBDIR += obliterate SUBDIR += open + SUBDIR += openupsd SUBDIR += p5-File-Which SUBDIR += p5-Filesys-DiskFree SUBDIR += p5-Filesys-DiskSpace diff --git a/sysutils/openupsd/Makefile b/sysutils/openupsd/Makefile new file mode 100644 index 000000000000..105d22f20038 --- /dev/null +++ b/sysutils/openupsd/Makefile @@ -0,0 +1,30 @@ +# New ports collection makefile for: openupsd +# Date created: 15 August 2004 +# Whom: Tim Bishop +# +# $FreeBSD$ +# + +PORTNAME= openupsd +PORTVERSION= 0.3.0 +CATEGORIES= sysutils +MASTER_SITES= http://frmb.org/download/ + +MAINTAINER= tim@bishnet.net +COMMENT= A UPS daemon for some Belkin UPS's + +USE_RC_SUBR= yes +GNU_CONFIGURE= yes +CONFIGURE_ARGS= --program-transform-name= --bindir=${PREFIX}/sbin + +PLIST_FILES= sbin/openupsd etc/openupsd.conf.sample etc/rc.d/openupsd.sh + +post-extract: + @${SED} -e 's#%%RC_SUBR%%#${RC_SUBR}#g' -e 's#%%PREFIX%%#${PREFIX}#g' \ + ${FILESDIR}/openupsd.sh > ${WRKDIR}/openupsd.sh + +post-install: + ${INSTALL_DATA} ${WRKSRC}/openupsd.conf ${PREFIX}/etc/openupsd.conf.sample + ${INSTALL_SCRIPT} ${WRKDIR}/openupsd.sh ${PREFIX}/etc/rc.d/ + +.include diff --git a/sysutils/openupsd/distinfo b/sysutils/openupsd/distinfo new file mode 100644 index 000000000000..d99539b701af --- /dev/null +++ b/sysutils/openupsd/distinfo @@ -0,0 +1,2 @@ +MD5 (openupsd-0.3.0.tar.gz) = 99cecb372895a8a08d9ae5b2d428a606 +SIZE (openupsd-0.3.0.tar.gz) = 120596 diff --git a/sysutils/openupsd/files/openupsd.sh b/sysutils/openupsd/files/openupsd.sh new file mode 100644 index 000000000000..d5610a224146 --- /dev/null +++ b/sysutils/openupsd/files/openupsd.sh @@ -0,0 +1,30 @@ +#!/bin/sh +# +# $FreeBSD$ +# +# PROVIDE: openupsd +# REQUIRE: LOGIN +# KEYWORD: FreeBSD shutdown + +openupsd_enable=${openupsd_enable:-"NO"} + +. %%RC_SUBR%% + +name="openupsd" +rcvar=`set_rcvar` + +start_cmd="${name}_start" +stop_cmd="${name}_stop" + +openupsd_start() +{ + %%PREFIX%%/sbin/openupsd +} + +openupsd_stop() +{ + killall openupsd +} + +load_rc_config $name +run_rc_command "$1" diff --git a/sysutils/openupsd/files/patch-support.c b/sysutils/openupsd/files/patch-support.c new file mode 100644 index 000000000000..b18bb2828b85 --- /dev/null +++ b/sysutils/openupsd/files/patch-support.c @@ -0,0 +1,10 @@ +--- support.c.bak Sun Aug 15 16:26:05 2004 ++++ support.c Sun Aug 15 16:26:13 2004 +@@ -23,7 +23,6 @@ + #ifdef HAVE_STDLIB_H + #include + #endif +-#include + #include + #include + #include diff --git a/sysutils/openupsd/pkg-descr b/sysutils/openupsd/pkg-descr new file mode 100644 index 000000000000..4eeaa29ccd3c --- /dev/null +++ b/sysutils/openupsd/pkg-descr @@ -0,0 +1,5 @@ +OpenUPSd is a UPS daemon, pretty specific to those Belkin +serial-connected UPS's that speak the "regulator pro smart protocol". +This daemon is monitoring only, at the moment anyway. + +WWW: http://frmb.org/openupsd.html -- cgit v1.2.3