aboutsummaryrefslogtreecommitdiff
path: root/sysutils
diff options
context:
space:
mode:
authorPav Lucistnik <pav@FreeBSD.org>2004-08-17 09:25:37 +0000
committerPav Lucistnik <pav@FreeBSD.org>2004-08-17 09:25:37 +0000
commitbc8ecab0f46c5b900e7724911acc01bda53a3bf6 (patch)
tree19fc987969ca0cb2e351898d6d004cf826db740a /sysutils
parent7602e7208d2e95edd6ef4f6dd9df4e0a9164be19 (diff)
downloadports-bc8ecab0f46c5b900e7724911acc01bda53a3bf6.tar.gz
ports-bc8ecab0f46c5b900e7724911acc01bda53a3bf6.zip
Notes
Diffstat (limited to 'sysutils')
-rw-r--r--sysutils/Makefile1
-rw-r--r--sysutils/openupsd/Makefile30
-rw-r--r--sysutils/openupsd/distinfo2
-rw-r--r--sysutils/openupsd/files/openupsd.sh30
-rw-r--r--sysutils/openupsd/files/patch-support.c10
-rw-r--r--sysutils/openupsd/pkg-descr5
6 files changed, 78 insertions, 0 deletions
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 <tim@bishnet.net>
+#
+# $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 <bsd.port.mk>
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 <stdlib.h>
+ #endif
+-#include <malloc.h>
+ #include <sys/time.h>
+ #include <netinet/in.h>
+ #include <termios.h>
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