[Midnightbsd-cvs] mports: sysutils/upsmon:

laffer1 at midnightbsd.org laffer1 at midnightbsd.org
Sun Aug 24 17:57:13 EDT 2008


Log Message:
-----------


Added Files:
-----------
    mports/sysutils/upsmon:
        Makefile (r1.1)
        distinfo (r1.1)
        pkg-descr (r1.1)
        pkg-message (r1.1)
        pkg-plist (r1.1)
    mports/sysutils/upsmon/files:
        patch-aa (r1.1)
        patch-csocket.h (r1.1)
        patch-daemon.cc (r1.1)
        upsmon.sh (r1.1)

-------------- next part --------------
--- /dev/null
+++ sysutils/upsmon/pkg-message
@@ -0,0 +1,9 @@
+
+upsmon has been installed.
+
+See /usr/local/share/doc/upsmon/INSTALL for command line
+option details.
+
+NOTE: upsmond will dump core if you start upsstat without
+      SmartUPS properly attached to the specified port.
+
--- /dev/null
+++ sysutils/upsmon/pkg-descr
@@ -0,0 +1,5 @@
+Designed specifically for the APC SmartUPS devices, the
+software is dependent on the SmartUPS interface and will
+only function with SmartUPS devices.
+
+Provides the basic functions.
--- /dev/null
+++ sysutils/upsmon/pkg-plist
@@ -0,0 +1,5 @@
+bin/upsstat
+sbin/upsmond
+etc/rc.d/upsmon.sh
+%%PORTDOCS%%share/doc/upsmon/INSTALL
+%%PORTDOCS%%@dirrm share/doc/upsmon
--- /dev/null
+++ sysutils/upsmon/Makefile
@@ -0,0 +1,38 @@
+# New ports collection makefile for:	upsmon
+# Date created:		5 Oct 1998
+# Whom:			Igor Vinokurov <igor at zynaps.ru>
+#
+# $MidnightBSD: mports/sysutils/upsmon/Makefile,v 1.1 2008/08/24 21:57:11 laffer1 Exp $
+# $FreeBSD: ports/sysutils/upsmon/Makefile,v 1.13 2007/12/20 16:00:51 pav Exp $
+#
+
+PORTNAME=	upsmon
+PORTVERSION=	2.1.3
+CATEGORIES=	sysutils
+MASTER_SITES=	ftp://ftp.dinoex.de/pub/experiment/ \
+		ftp://newcorridor.com/pub/upsmon/
+
+MAINTAINER=	ports at MidnightBSD.org
+COMMENT=	Basic UPS monitor for the APC SmartUPS devices
+LICENSE=	restricted
+
+MAKEFILE=	makefile.bsdi
+RESTRICTED=	"must provide without modifications"
+
+do-install:
+	${INSTALL_PROGRAM} ${WRKSRC}/upsstat ${PREFIX}/bin
+	${INSTALL_PROGRAM} ${WRKSRC}/upsmond ${PREFIX}/sbin
+
+	${SED} -e 's#!!PREFIX!!#${TRUE_PREFIX}#g' ${FILESDIR}/upsmon.sh \
+	> ${PREFIX}/etc/rc.d/upsmon.sh
+	@${CHMOD} +x ${PREFIX}/etc/rc.d/upsmon.sh
+
+.if !defined(NOPORTDOCS)
+	@${MKDIR} ${DOCSDIR}
+	@${INSTALL_DATA} ${WRKSRC}/INSTALL ${DOCSDIR}
+.endif
+
+post-install:
+	${SED} -e 's#/usr/local#${TRUE_PREFIX}#' ${PKGMESSAGE}
+
+.include <bsd.port.mk>
--- /dev/null
+++ sysutils/upsmon/distinfo
@@ -0,0 +1,3 @@
+MD5 (upsmon-2.1.3.tar.gz) = 2ab764327dcb1cef58a1c8d2745a3884
+SHA256 (upsmon-2.1.3.tar.gz) = a15117be5c0bd0f24100034021c0c0fcbe9f3d68b53efeab02bb8a872046b943
+SIZE (upsmon-2.1.3.tar.gz) = 23890
--- /dev/null
+++ sysutils/upsmon/files/patch-daemon.cc
@@ -0,0 +1,10 @@
+--- daemon.cc.bak	Tue Aug  4 17:18:14 1998
++++ daemon.cc	Wed Aug 20 17:07:49 2003
+@@ -32,6 +32,7 @@
+ #include <sys/types.h>
+ #include <sys/stat.h>
+ #include <fcntl.h>
++#include <stdlib.h>
+ #include <unistd.h>
+ #include "stddef.h"
+ #include "daemon.h"
--- /dev/null
+++ sysutils/upsmon/files/patch-csocket.h
@@ -0,0 +1,12 @@
+--- csocket.h.bak	Wed Aug 20 17:08:31 2003
++++ csocket.h	Wed Aug 20 17:09:01 2003
+@@ -94,7 +94,7 @@
+     int m_fdSocketNormal;                 // named stream socket descriptor - use for client/server exchange
+     int m_fdSocketServer;                 // server socket - used by server to listen for connections
+     int m_iLocalAddrLen;                  // local socket address length
+-    int m_iRemoteAddrLen;                 // local socket address length
++    socklen_t m_iRemoteAddrLen;           // local socket address length
+     struct sockaddr_un m_saunLocal;       // local socket address
+     struct sockaddr_un m_saunRemote;      // remote socket address
+     char m_szSocketPath[MAX_PATHNAME];    // named stream socket path
+
--- /dev/null
+++ sysutils/upsmon/files/upsmon.sh
@@ -0,0 +1,20 @@
+#!/bin/sh
+
+case $1 in
+start)
+	# see !!PREFIX!!/share/doc/upsmon/INSTALL for command line option details
+
+	if [ -x !!PREFIX!!/sbin/upsmond ]; then
+		!!PREFIX!!/sbin/upsmond -p /dev/cuaa0 2>&1 > /dev/null && echo -n ' upsmond'
+	fi
+	;;
+stop)
+	killall upsmond && echo -n ' upsmond'
+	;;
+*)
+	echo "Usage: `basename $0` {start|stop}" >&2
+	exit 64
+	;;
+esac
+
+exit 0
--- /dev/null
+++ sysutils/upsmon/files/patch-aa
@@ -0,0 +1,22 @@
+--- makefile.bsdi.orig	Tue Aug  4 23:18:38 1998
++++ makefile.bsdi	Wed Aug 20 23:55:50 2003
+@@ -32,14 +32,14 @@
+ .SUFFIXES:        #clear list of suffixes
+ .SUFFIXES: .cc .o #rules for .c and .o
+ 
+-CC = gcc
+-CFLAGS_DEBUG = -O2 -Wall -DDEBUG -g
+-CFLAGS_NODEBUG = -O2 -Wall -g
++CC = g++
++CFLAGS_DEBUG = -DDEBUG
++CFLAGS_NODEBUG = 
+ 
+ .ifdef DEBUG
+-CFLAGS = $(CFLAGS_DEBUG)
++CFLAGS += $(CFLAGS_DEBUG)
+ .else
+-CFLAGS = $(CFLAGS_NODEBUG)
++CFLAGS += $(CFLAGS_NODEBUG)
+ .endif
+ 
+ UPSMOND_TARGET = upsmond


More information about the Midnightbsd-cvs mailing list