update to NUT 2.6.2 and add rc.d scripts
- thanks ajacoutot@ for looking over the scripts - note that there has been some major work on apcsmart; in the event of problems the old driver is still available as apcsmart-old
This commit is contained in:
parent
e7a158b800
commit
8103eadcb9
@ -1,44 +1,42 @@
|
||||
# $OpenBSD: Makefile,v 1.48 2011/09/16 11:41:40 espie Exp $
|
||||
# $OpenBSD: Makefile,v 1.49 2011/09/19 15:59:57 sthen Exp $
|
||||
|
||||
COMMENT-main= UPS monitoring program supporting many brands
|
||||
COMMENT-cgi= CGIs for monitoring Nut-based UPSs
|
||||
COMMENT-snmp= driver for monitoring UPS via SNMP
|
||||
COMMENT-xml= driver for monitoring UPS via XML/HTTP
|
||||
|
||||
DISTNAME= nut-2.6.1
|
||||
REVISION-main= 0
|
||||
REVISION-cgi = 0
|
||||
REVISION-snmp = 0
|
||||
REVISION-xml = 0
|
||||
DISTNAME= nut-2.6.2
|
||||
|
||||
PKGNAME-main= ${DISTNAME}
|
||||
PKGNAME-cgi= ${DISTNAME:S/-/-cgi-/}
|
||||
PKGNAME-snmp= ${DISTNAME:S/-/-snmp-/}
|
||||
PKGNAME-xml= ${DISTNAME:S/-/-xml-/}
|
||||
|
||||
SHARED_LIBS += upsclient 1.0 # 1.0
|
||||
SHARED_LIBS += nutscan 0.0 # 1.0
|
||||
|
||||
CATEGORIES= sysutils
|
||||
HOMEPAGE= http://www.networkupstools.org/
|
||||
|
||||
MAINTAINER= Stuart Henderson <sthen@openbsd.org>
|
||||
|
||||
SHARED_LIBS+= upsclient 1.0
|
||||
|
||||
# GPLv2+, some scripts (not packaged) are GPLv3+
|
||||
PERMIT_PACKAGE_CDROM= Yes
|
||||
PERMIT_PACKAGE_FTP= Yes
|
||||
PERMIT_DISTFILES_CDROM= Yes
|
||||
PERMIT_DISTFILES_FTP= Yes
|
||||
|
||||
COMMON = c crypto
|
||||
WANTLIB-main += ${COMMON} m ssl usb
|
||||
COMMON += c crypto pthread
|
||||
WANTLIB-main += ${COMMON} ${WANTLIB} asn1 expat gssapi krb5 m ssl usb z
|
||||
WANTLIB-xml += ${COMMON} ${WANTLIB} asn1 expat gssapi krb5 neon ssl z
|
||||
WANTLIB-cgi += ${COMMON} ${WANTLIB} X11 Xau Xdmcp expat fontconfig
|
||||
WANTLIB-cgi += freetype gd jpeg m png pthread-stubs ssl upsclient xcb z
|
||||
WANTLIB-snmp += ${COMMON} netsnmp
|
||||
WANTLIB-cgi += ${COMMON} ${WANTLIB} X11 expat fontconfig
|
||||
WANTLIB-cgi += freetype gd jpeg m png ssl upsclient xcb z
|
||||
WANTLIB-snmp += ${COMMON} m netsnmp
|
||||
|
||||
MASTER_SITES= ${HOMEPAGE}source/2.6/
|
||||
|
||||
MODULES= devel/gettext
|
||||
MODULES= devel/gettext lang/python
|
||||
MODPY_RUNDEP= No
|
||||
BUILD_DEPENDS+= textproc/asciidoc \
|
||||
textproc/docbook \
|
||||
textproc/docbook-xsl
|
||||
@ -112,6 +110,7 @@ NO_REGRESS= Yes
|
||||
|
||||
pre-configure:
|
||||
${SUBST_CMD} ${WRKSRC}/conf/upssched.conf.sample.in
|
||||
ln -s ${MODPY_BIN} ${WRKDIR}/bin/python
|
||||
|
||||
post-install:
|
||||
${INSTALL_DATA_DIR} ${WRKINST}${WEB_ROOT}/conf/nut/
|
||||
|
@ -1,5 +1,5 @@
|
||||
MD5 (nut-2.6.1.tar.gz) = ieZAUnLMgsU9e4QWCUV2Gw==
|
||||
RMD160 (nut-2.6.1.tar.gz) = /FxsMCj5orQWFdITvqEbXedzWEA=
|
||||
SHA1 (nut-2.6.1.tar.gz) = gZg3glljG1DSPGzlpS7w5AEysz8=
|
||||
SHA256 (nut-2.6.1.tar.gz) = 9cRrhWwM9bfw5LItgrZwr2TMmHF6kOqshyPdQCoYHAA=
|
||||
SIZE (nut-2.6.1.tar.gz) = 1776645
|
||||
MD5 (nut-2.6.2.tar.gz) = 9tBoPlHg/KsG5qeXJGhdJg==
|
||||
RMD160 (nut-2.6.2.tar.gz) = aKyyGwZx11P7DF1cw9XIY3bzb+0=
|
||||
SHA1 (nut-2.6.2.tar.gz) = 9uvxoYNbGtWg5d5JhFHSLkhHmUM=
|
||||
SHA256 (nut-2.6.2.tar.gz) = NDVUrdBxM0j4sJvKjYPu4usq6LrZza2aOeDw4tD103U=
|
||||
SIZE (nut-2.6.2.tar.gz) = 1897691
|
||||
|
@ -1,7 +1,7 @@
|
||||
$OpenBSD: patch-clients_Makefile_in,v 1.13 2011/06/02 10:37:08 sthen Exp $
|
||||
--- clients/Makefile.in.orig Wed Jun 1 13:00:01 2011
|
||||
+++ clients/Makefile.in Thu Jun 2 09:20:57 2011
|
||||
@@ -363,10 +363,12 @@ upsmon_SOURCES = upsmon.c upsmon.h upsclient.h
|
||||
$OpenBSD: patch-clients_Makefile_in,v 1.14 2011/09/19 15:59:57 sthen Exp $
|
||||
--- clients/Makefile.in.orig Thu Sep 15 12:33:21 2011
|
||||
+++ clients/Makefile.in Mon Sep 19 09:22:02 2011
|
||||
@@ -375,10 +375,12 @@ upsmon_SOURCES = upsmon.c upsmon.h upsclient.h
|
||||
upssched_SOURCES = upssched.c upssched.h
|
||||
upssched_LDADD = ../common/libcommon.la ../common/libparseconf.la $(NETLIBS)
|
||||
upsimage_cgi_SOURCES = upsimage.c upsclient.h upsimagearg.h cgilib.c cgilib.h
|
||||
|
@ -1,7 +1,7 @@
|
||||
$OpenBSD: patch-common_common_c,v 1.6 2011/03/09 11:00:55 sthen Exp $
|
||||
--- common/common.c.orig Fri Dec 24 13:24:06 2010
|
||||
+++ common/common.c Sat Feb 26 14:37:36 2011
|
||||
@@ -358,6 +358,17 @@ const char * confpath(void)
|
||||
$OpenBSD: patch-common_common_c,v 1.7 2011/09/19 15:59:57 sthen Exp $
|
||||
--- common/common.c.orig Thu Sep 15 12:30:44 2011
|
||||
+++ common/common.c Mon Sep 19 09:22:03 2011
|
||||
@@ -363,6 +363,17 @@ const char * confpath(void)
|
||||
return path;
|
||||
}
|
||||
|
||||
|
@ -1,7 +1,7 @@
|
||||
$OpenBSD: patch-configure,v 1.15 2011/06/02 10:37:08 sthen Exp $
|
||||
--- configure.orig Wed Jun 1 13:00:00 2011
|
||||
+++ configure Thu Jun 2 09:20:58 2011
|
||||
@@ -11505,7 +11505,7 @@ else
|
||||
$OpenBSD: patch-configure,v 1.16 2011/09/19 15:59:57 sthen Exp $
|
||||
--- configure.orig Thu Sep 15 12:33:20 2011
|
||||
+++ configure Mon Sep 19 09:22:03 2011
|
||||
@@ -12005,7 +12005,7 @@ ac_compiler_gnu=$ac_cv_c_compiler_gnu
|
||||
/* end confdefs.h. */
|
||||
|
||||
int
|
||||
|
11
sysutils/nut/patches/patch-tools_nut-scanner_nutscan-ip_h
Normal file
11
sysutils/nut/patches/patch-tools_nut-scanner_nutscan-ip_h
Normal file
@ -0,0 +1,11 @@
|
||||
$OpenBSD: patch-tools_nut-scanner_nutscan-ip_h,v 1.1 2011/09/19 15:59:57 sthen Exp $
|
||||
--- tools/nut-scanner/nutscan-ip.h.orig Mon Sep 19 09:29:07 2011
|
||||
+++ tools/nut-scanner/nutscan-ip.h Mon Sep 19 09:29:42 2011
|
||||
@@ -19,6 +19,7 @@
|
||||
#ifndef SCAN_IP
|
||||
#define SCAN_IP
|
||||
|
||||
+#include <sys/types.h>
|
||||
#include <sys/socket.h>
|
||||
#include <netinet/in.h>
|
||||
#include <arpa/inet.h>
|
15
sysutils/nut/patches/patch-tools_nut-usbinfo_pl
Normal file
15
sysutils/nut/patches/patch-tools_nut-usbinfo_pl
Normal file
@ -0,0 +1,15 @@
|
||||
$OpenBSD: patch-tools_nut-usbinfo_pl,v 1.1 2011/09/19 15:59:57 sthen Exp $
|
||||
|
||||
skip backup copy of patched files
|
||||
|
||||
--- tools/nut-usbinfo.pl.orig Mon Sep 19 09:32:58 2011
|
||||
+++ tools/nut-usbinfo.pl Mon Sep 19 09:34:32 2011
|
||||
@@ -211,7 +211,7 @@ sub gen_usb_files
|
||||
|
||||
sub find_usbdevs
|
||||
{
|
||||
- return $File::Find::prune = 1 if $_ eq '.svn';
|
||||
+ return $File::Find::prune = 1 if $_ eq '.svn' or m/.*\.orig/;
|
||||
|
||||
my $nameFile=$_;
|
||||
my $lastComment="";
|
@ -1,14 +1,3 @@
|
||||
Once you have the config files under ${SYSCONFDIR}/nut set up properly, the
|
||||
following block can be added to your /etc/rc.local file to start nut.
|
||||
|
||||
# Start Nut
|
||||
if [ -x ${PREFIX}/bin/upsdrvctl ]; then
|
||||
echo -n ' nut'
|
||||
${PREFIX}/bin/upsdrvctl start > /dev/null 2>&1
|
||||
${PREFIX}/sbin/upsd > /dev/null 2>&1
|
||||
${PREFIX}/sbin/upsmon > /dev/null 2>&1
|
||||
fi
|
||||
|
||||
The userid running NUT (normally ${NUT_USER}) must have access to the relevant
|
||||
device nodes. For a UPS connected by RS232, either add ${NUT_USER} to group
|
||||
"dialer" or change group of the relevant /dev/tty* device to ${NUT_USER}.
|
||||
|
@ -1,4 +1,4 @@
|
||||
@comment $OpenBSD: PLIST-main,v 1.10 2011/06/02 10:37:08 sthen Exp $
|
||||
@comment $OpenBSD: PLIST-main,v 1.11 2011/09/19 15:59:57 sthen Exp $
|
||||
@conflict upsd-*
|
||||
@pkgpath sysutils/nut
|
||||
@pkgpath sysutils/nut,no_cgi
|
||||
@ -8,6 +8,7 @@
|
||||
@newuser ${NUT_USER}:${NUT_ID}:${NUT_ID}::UPS User:/var/empty:/sbin/nologin
|
||||
%%SHARED%%
|
||||
@bin bin/apcsmart
|
||||
@bin bin/apcsmart-old
|
||||
@bin bin/bcmxcp
|
||||
@bin bin/bcmxcp_usb
|
||||
@bin bin/belkin
|
||||
@ -35,6 +36,7 @@
|
||||
@bin bin/mge-utalk
|
||||
@bin bin/microdowell
|
||||
@bin bin/newmge-shut
|
||||
@bin bin/nut-scanner
|
||||
@bin bin/oneac
|
||||
@bin bin/optiups
|
||||
@bin bin/powercom
|
||||
@ -61,9 +63,11 @@ bin/upssched-cmd
|
||||
@comment html/header.html
|
||||
@comment html/index.html
|
||||
html/nut-banner.png
|
||||
lib/libnutscan.a
|
||||
lib/libnutscan.la
|
||||
@lib lib/libnutscan.so.${LIBnutscan_VERSION}
|
||||
lib/libupsclient.a
|
||||
lib/libupsclient.la
|
||||
lib/pkgconfig/
|
||||
@man man/man5/hosts.conf.5
|
||||
@man man/man5/nut.conf.5
|
||||
@man man/man5/ups.conf.5
|
||||
@ -73,6 +77,7 @@ lib/pkgconfig/
|
||||
@man man/man5/upssched.conf.5
|
||||
@man man/man5/upsset.conf.5
|
||||
@man man/man5/upsstats.html.5
|
||||
@man man/man8/apcsmart-old.8
|
||||
@man man/man8/apcsmart.8
|
||||
@man man/man8/bcmxcp.8
|
||||
@man man/man8/bcmxcp_usb.8
|
||||
@ -98,6 +103,7 @@ lib/pkgconfig/
|
||||
@man man/man8/mge-shut.8
|
||||
@man man/man8/mge-utalk.8
|
||||
@man man/man8/microdowell.8
|
||||
@man man/man8/nut-scanner.8
|
||||
@man man/man8/nutupsdrv.8
|
||||
@man man/man8/oneac.8
|
||||
@man man/man8/optiups.8
|
||||
@ -209,3 +215,5 @@ share/examples/nut/upsset.conf.sample
|
||||
share/ups/
|
||||
share/ups/cmdvartab
|
||||
share/ups/driver.list
|
||||
@rcscript ${RCDIR}/upsd
|
||||
@rcscript ${RCDIR}/upsmon
|
||||
|
19
sysutils/nut/pkg/upsd.rc
Normal file
19
sysutils/nut/pkg/upsd.rc
Normal file
@ -0,0 +1,19 @@
|
||||
#!/bin/sh
|
||||
#
|
||||
# $OpenBSD: upsd.rc,v 1.1 2011/09/19 15:59:57 sthen Exp $
|
||||
|
||||
daemon="${TRUEPREFIX}/sbin/upsd"
|
||||
|
||||
. /etc/rc.d/rc.subr
|
||||
|
||||
upsdrvctl="${TRUEPREFIX}/bin/upsdrvctl"
|
||||
|
||||
rc_pre() {
|
||||
${upsdrvctl} start
|
||||
}
|
||||
|
||||
rc_post() {
|
||||
${upsdrvctl} stop
|
||||
}
|
||||
|
||||
rc_cmd $1
|
17
sysutils/nut/pkg/upsmon.rc
Normal file
17
sysutils/nut/pkg/upsmon.rc
Normal file
@ -0,0 +1,17 @@
|
||||
#!/bin/sh
|
||||
#
|
||||
# $OpenBSD: upsmon.rc,v 1.1 2011/09/19 15:59:57 sthen Exp $
|
||||
|
||||
daemon="${TRUEPREFIX}/sbin/upsmon"
|
||||
|
||||
. /etc/rc.d/rc.subr
|
||||
|
||||
rc_reload() {
|
||||
${daemon} -c reload
|
||||
}
|
||||
|
||||
rc_stop() {
|
||||
${daemon} -c stop
|
||||
}
|
||||
|
||||
rc_cmd $1
|
Loading…
x
Reference in New Issue
Block a user