aboutsummaryrefslogtreecommitdiff
path: root/sysutils/nut22
diff options
context:
space:
mode:
authorMartin Matuska <mm@FreeBSD.org>2008-06-11 11:32:05 +0000
committerMartin Matuska <mm@FreeBSD.org>2008-06-11 11:32:05 +0000
commit3a2fb900f12bdbd536fd2ca98c6034492f012e5f (patch)
tree77792a43ce89bdff4be0a556516c884f9bdef2b2 /sysutils/nut22
parent2eb82366c1907906b653a2d5497d0ad242241f7a (diff)
downloadports-3a2fb900f12bdbd536fd2ca98c6034492f012e5f.tar.gz
ports-3a2fb900f12bdbd536fd2ca98c6034492f012e5f.zip
Notes
Diffstat (limited to 'sysutils/nut22')
-rw-r--r--sysutils/nut22/Makefile98
-rw-r--r--sysutils/nut22/distinfo12
-rw-r--r--sysutils/nut22/files/patch-include-Makefile.in11
-rw-r--r--sysutils/nut22/pkg-plist119
4 files changed, 132 insertions, 108 deletions
diff --git a/sysutils/nut22/Makefile b/sysutils/nut22/Makefile
index e6beba1a69de..4ed8fb4198e3 100644
--- a/sysutils/nut22/Makefile
+++ b/sysutils/nut22/Makefile
@@ -6,8 +6,8 @@
#
PORTNAME= nut
-PORTVERSION= 2.2.1
-PORTREVISION= 1
+PORTVERSION= 2.2.2
+#PORTREVISION= 1
CATEGORIES= sysutils
MASTER_SITES= http://www.networkupstools.org/source/${PORTVERSION:R}/
DISTFILES= ${DISTNAME}${EXTRACT_SUFX} ${DISTNAME}${EXTRACT_SUFX}.sig
@@ -19,15 +19,20 @@ COMMENT= Network UPS Tools
USE_AUTOTOOLS= autoconf:261
GNU_CONFIGURE= yes
USE_GMAKE= yes
+USE_LDCONFIG= yes
+USE_GNOME= pkgconfig
NUT_USER?= uucp
NUT_GROUP?= uucp
STATEDIR?= /var/db/nut
-OPTIONS= USB "USB support" on \
+OPTIONS= SERIAL "SERIAL support" on \
+ USB "USB support" on \
SNMP "SNMP support" on \
+ NEON "NEON XML/HTTP support" on \
+ HAL "HAL support" off \
IPV6 "IPV6 support" on \
- LIBUPSCLIENT "Include the libupsclient library" off \
+ DEVEL "Install header files" off \
CGI "Web CGI interface" off \
USE_RC_SUBR= nut.sh nut_upsmon.sh nut_upslog.sh
@@ -36,14 +41,9 @@ PLIST_SUB+= STATEDIR=${STATEDIR}
MAN5= ups.conf.5 upsd.conf.5 upsd.users.5 upsmon.conf.5 \
upssched.conf.5
-MAN8= al175.8 apcsmart.8 bcmxcp.8 belkin.8 belkinunv.8 \
- bestuferrups.8 bestups.8 bestfcom.8 cpsups.8 cyberpower.8 \
- dummy-ups.8 etapro.8 everups.8 gamatronic.8 genericups.8 \
- isbmex.8 liebert.8 masterguard.8 megatec.8 metasys.8 \
- mge-shut.8 mge-utalk.8 nitram.8 nutupsdrv.8 oneac.8 optiups.8 \
- powercom.8 powerpanel.8 rhino.8 safenet.8 solis.8 tripplite.8 \
- tripplitesu.8 upsc.8 upscmd.8 upscode2.8 upsd.8 upsdrvctl.8 \
- upslog.8 upsmon.8 upsrw.8 upssched.8 victronups.8
+
+MAN8= nutupsdrv.8 upsc.8 upscmd.8 upsd.8 upsdrvctl.8 \
+ upslog.8 upsmon.8 upsrw.8 upssched.8
PORTDOCS= *
@@ -57,6 +57,7 @@ CONFIGURE_ARGS= --sysconfdir=${PREFIX}/etc/nut \
--with-statepath=${STATEDIR} \
--with-altpidpath=${STATEDIR} \
--with-pidpath=${STATEDIR} \
+ --with-pkgconfig-dir=${PREFIX}/libdata/pkgconfig \
--with-linux-hiddev=no \
--with-user=${NUT_USER} \
--with-group=${NUT_GROUP}
@@ -65,26 +66,35 @@ CONFIGURE_ARGS= --sysconfdir=${PREFIX}/etc/nut \
LIB_DEPENDS+= gd.4:${PORTSDIR}/graphics/gd
MAN5+= hosts.conf.5 upsset.conf.5 upsstats.html.5
MAN8+= upsset.cgi.8 upsstats.cgi.8 upsimage.cgi.8
-.if !exists(${PREFIX}/www) && exists(${PREFIX}/share/apache)
-CGIDIR?= share/apache/cgi-bin
-WWWDIR?= share/apache/htdocs
-.else
-CGIDIR?= www/cgi-bin
-WWWDIR?= www/data
-.endif
-CONFIGURE_ARGS+= --with-cgi --with-cgipath=${PREFIX}/${CGIDIR}/nut \
- --with-htmlpath=${PREFIX}/${WWWDIR}/nut \
+CGIDIR?= ${PREFIX}/www/cgi-bin/${PORTNAME}
+CGIDIR_REL?= ${CGIDIR:S,^${PREFIX}/,,}
+CONFIGURE_ARGS+= --with-cgi --with-cgipath=${CGIDIR} \
+ --with-htmlpath=${WWWDIR} \
--with-gd-includes=-I${PREFIX}/include \
--with-gd-libs="-L${PREFIX}/lib -lgd"
PLIST_SUB+= NUT_CGI=""
-PLIST_SUB+= WWWDIR="${WWWDIR}"
-PLIST_SUB+= CGIDIR="${CGIDIR}"
+PLIST_SUB+= CGIDIR="${CGIDIR_REL}"
PLIST_SUB+= CGIETCDIR="etc/nut/"
.else
CONFIGURE_ARGS+= --without-cgi
PLIST_SUB+= NUT_CGI="@comment "
.endif
+.if !defined(WITHOUT_SERIAL)
+CONFIGURE_ARGS+= --with-serial
+MAN8+= al175.8 apcsmart.8 bcmxcp.8 belkin.8 belkinunv.8 \
+ bestuferrups.8 bestups.8 bestfcom.8 cpsups.8 cyberpower.8 \
+ dummy-ups.8 etapro.8 everups.8 gamatronic.8 genericups.8 \
+ isbmex.8 liebert.8 masterguard.8 megatec.8 metasys.8 \
+ mge-shut.8 mge-utalk.8 nitram.8 nutupsdrv.8 oneac.8 optiups.8 \
+ powercom.8 powerpanel.8 rhino.8 safenet.8 solis.8 tripplite.8 \
+ tripplitesu.8 upscode2.8 victronups.8
+PLIST_SUB+= NUT_SERIAL=""
+.else
+CONFIGURE_ARGS+= --without-serial
+PLIST_SUB+= NUT_SERIAL="@comment "
+.endif
+
.if !defined(WITHOUT_USB)
LIB_DEPENDS+= usb-0.1.8:${PORTSDIR}/devel/libusb
CONFIGURE_ARGS+= --with-usb=auto
@@ -105,23 +115,47 @@ CONFIGURE_ARGS+= --without-snmp
PLIST_SUB+= NUT_SNMP="@comment "
.endif
+.if !defined(WITHOUT_NEON)
+LIB_DEPENDS+= neon.26:${PORTSDIR}/www/neon26
+CONFIGURE_ARGS+= --with-neonxml
+MAN8+= netxml-ups.8
+PLIST_SUB+= NUT_NEON=""
+.else
+CONFIGURE_ARGS+= --without-neonxml
+PLIST_SUB+= NUT_NEON="@comment "
+.endif
+
+.if defined(WITH_HAL)
+. if defined(WITHOUT_USB)
+BROKEN= HAL is only usable with USB support enabled. Run 'make config' again!
+. endif
+LIB_DEPENDS+= hal.1:${PORTSDIR}/sysutils/hal
+CONFIGURE_ARGS+= --with-hal
+#MAN8+=
+PLIST_SUB+= NUT_HAL=""
+.else
+CONFIGURE_ARGS+= --without-hal
+PLIST_SUB+= NUT_HAL="@comment "
+.endif
+
.if !defined(WITHOUT_IPV6)
CONFIGURE_ARGS+= --with-ipv6
.else
CONFIGURE_ARGS+= --without-ipv6
.endif
-.if defined(WITH_LIBUPSCLIENT)
-CONFIGURE_ARGS+= --with-lib --enable-pkg-config \
- --with-pkgconfig-dir=${PREFIX}/libdata/pkgconfig
-
-MAN3+= upscli_connect.3 upscli_disconnect.3 upscli_readline.3 \
- upscli_sendline.3 upscli_splitname.3 upscli_strerror.3
+.if defined(WITH_DEVEL)
+CONFIGURE_ARGS+= --with-dev
+MAN3+= upscli_connect.3 upscli_disconnect.3 upscli_fd.3 \
+ upscli_get.3 upscli_list_next.3 upscli_list_start.3 \
+ upscli_readline.3 upscli_sendline.3 upscli_splitaddr.3 \
+ upscli_splitname.3 upscli_ssl.3 upscli_strerror.3 \
+ upscli_upserror.3 upsclient.3
-PLIST_SUB+= NUT_LIB=""
+PLIST_SUB+= NUT_DEVEL=""
.else
-CONFIGURE_ARGS+= --without-lib
-PLIST_SUB+= NUT_LIB="@comment "
+CONFIGURE_ARGS+= --without-dev
+PLIST_SUB+= NUT_DEVEL="@comment "
.endif
pre-install:
diff --git a/sysutils/nut22/distinfo b/sysutils/nut22/distinfo
index f523f9165a9f..430e505e1878 100644
--- a/sysutils/nut22/distinfo
+++ b/sysutils/nut22/distinfo
@@ -1,6 +1,6 @@
-MD5 (nut-2.2.1.tar.gz) = c7ae871961a7dbe12b22d504267dc132
-SHA256 (nut-2.2.1.tar.gz) = 9aad15d8cdd8694839b54342c8b4c26ddce508f6fb29ff4bee3abbe1555771f4
-SIZE (nut-2.2.1.tar.gz) = 1192538
-MD5 (nut-2.2.1.tar.gz.sig) = 544eb134c6f42887656eb0aabde10df3
-SHA256 (nut-2.2.1.tar.gz.sig) = 769320a47ffcb96ada3f774c48f8338d7cd6836dca8c72d439bfc8bffe661393
-SIZE (nut-2.2.1.tar.gz.sig) = 65
+MD5 (nut-2.2.2.tar.gz) = 677a84a83e9be7bc93610413ee696375
+SHA256 (nut-2.2.2.tar.gz) = 599d0024bcc116137a3eb65030d3dbc7132a64f30a7717f76a8254d8543422eb
+SIZE (nut-2.2.2.tar.gz) = 1184406
+MD5 (nut-2.2.2.tar.gz.sig) = 2664e2b5bd2a7e7cd2939cb3f43d8e3d
+SHA256 (nut-2.2.2.tar.gz.sig) = 17f420125e63368f127b6802aa60c3be6a99737276bf82163fc694c2d186fe22
+SIZE (nut-2.2.2.tar.gz.sig) = 65
diff --git a/sysutils/nut22/files/patch-include-Makefile.in b/sysutils/nut22/files/patch-include-Makefile.in
deleted file mode 100644
index de795aaf72e0..000000000000
--- a/sysutils/nut22/files/patch-include-Makefile.in
+++ /dev/null
@@ -1,11 +0,0 @@
---- include/Makefile.in.orig Fri Dec 21 15:00:52 2007
-+++ include/Makefile.in Thu Jan 17 20:23:32 2008
-@@ -229,7 +229,7 @@
- BUILT_SOURCES = nut_version.h nut_stdint.h
- CLEANFILES = nut_version.h nut_stdint.h
- SVNREV = $(shell unset LANG && svnversion -n $(top_srcdir) 2>/dev/null)
--NUT_VERSION = $(shell if test "$(SVNREV)" = "exported"; then echo "$(PACKAGE_VERSION)"; else echo "$(PACKAGE_VERSION)-$(SVNREV)"; fi)
-+NUT_VERSION = $(shell if test "$(SVNREV)" = "exported" -o -z "${SVNREV}"; then echo "$(PACKAGE_VERSION)"; else echo "$(PACKAGE_VERSION)-$(SVNREV)"; fi)
- all: $(BUILT_SOURCES) config.h
- $(MAKE) $(AM_MAKEFLAGS) all-am
-
diff --git a/sysutils/nut22/pkg-plist b/sysutils/nut22/pkg-plist
index f586f5cfa8d7..f18971be7baf 100644
--- a/sysutils/nut22/pkg-plist
+++ b/sysutils/nut22/pkg-plist
@@ -1,10 +1,6 @@
-@unexec %D/etc/rc.d/nut_upslog.sh forcestop 2>/dev/null || true
-@unexec %D/etc/rc.d/nut_upsmon.sh forcestop 2>/dev/null || true
-@unexec %D/etc/rc.d/nut.sh forcestop 2>/dev/null || true
-@unexec %D/etc/rc.d/nut_upslog forcestop 2>/dev/null || true
-@unexec %D/etc/rc.d/nut_upsmon forcestop 2>/dev/null || true
-@unexec %D/etc/rc.d/nut forcestop 2>/dev/null || true
-%%NUT_LIB%%bin/libupsclient-config
+@stopdaemon nut_upsmon
+@stopdaemon nut_upslog
+@stopdaemon nut
bin/upsc
bin/upscmd
bin/upslog
@@ -17,71 +13,76 @@ etc/nut/upsd.conf.sample
etc/nut/upsd.users.sample
etc/nut/upsmon.conf.sample
etc/nut/upssched.conf.sample
-%%NUT_LIB%%include/parseconf.h
-%%NUT_LIB%%include/upsclient.h
-%%NUT_LIB%%lib/libupsclient.a
-libexec/nut/al175
-libexec/nut/apcsmart
-libexec/nut/bcmxcp
+%%NUT_DEVEL%%include/parseconf.h
+%%NUT_DEVEL%%include/upsclient.h
+lib/libupsclient.so.1
+lib/libupsclient.so
+lib/libupsclient.la
+%%NUT_HAL%%libexec/hald-addon-bcmxcp_usb
+%%NUT_HAL%%libexec/hald-addon-megatec_usb
+%%NUT_HAL%%libexec/hald-addon-tripplite_usb
+%%NUT_HAL%%libexec/hald-addon-usbhid-ups
+%%NUT_SERIAL%%libexec/nut/al175
+%%NUT_SERIAL%%libexec/nut/apcsmart
+%%NUT_SERIAL%%libexec/nut/bcmxcp
%%NUT_USB%%libexec/nut/bcmxcp_usb
-libexec/nut/belkin
-libexec/nut/belkinunv
-libexec/nut/bestfcom
-libexec/nut/bestuferrups
-libexec/nut/bestups
-libexec/nut/cpsups
-libexec/nut/cyberpower
-libexec/nut/dummy-ups
-libexec/nut/etapro
-libexec/nut/everups
-libexec/nut/gamatronic
-libexec/nut/genericups
-libexec/nut/isbmex
-libexec/nut/liebert
-libexec/nut/masterguard
-libexec/nut/megatec
+%%NUT_SERIAL%%libexec/nut/belkin
+%%NUT_SERIAL%%libexec/nut/belkinunv
+%%NUT_SERIAL%%libexec/nut/bestfcom
+%%NUT_SERIAL%%libexec/nut/bestuferrups
+%%NUT_SERIAL%%libexec/nut/bestups
+%%NUT_SERIAL%%libexec/nut/cpsups
+%%NUT_SERIAL%%libexec/nut/cyberpower
+%%NUT_SERIAL%%libexec/nut/dummy-ups
+%%NUT_SERIAL%%libexec/nut/etapro
+%%NUT_SERIAL%%libexec/nut/everups
+%%NUT_SERIAL%%libexec/nut/gamatronic
+%%NUT_SERIAL%%libexec/nut/genericups
+%%NUT_SERIAL%%libexec/nut/isbmex
+%%NUT_SERIAL%%libexec/nut/liebert
+%%NUT_SERIAL%%libexec/nut/masterguard
+%%NUT_SERIAL%%libexec/nut/megatec
%%NUT_USB%%libexec/nut/megatec_usb
-libexec/nut/metasys
-libexec/nut/mge-shut
-libexec/nut/mge-utalk
-libexec/nut/newmge-shut
-libexec/nut/nitram
-libexec/nut/oneac
-libexec/nut/optiups
-libexec/nut/powercom
-libexec/nut/powerpanel
-libexec/nut/rhino
-libexec/nut/safenet
+%%NUT_SERIAL%%libexec/nut/metasys
+%%NUT_SERIAL%%libexec/nut/mge-shut
+%%NUT_SERIAL%%libexec/nut/mge-utalk
+%%NUT_NEON%%libexec/nut/netxml-ups
+%%NUT_SERIAL%%libexec/nut/newmge-shut
+%%NUT_SERIAL%%libexec/nut/nitram
+%%NUT_SERIAL%%libexec/nut/oneac
+%%NUT_SERIAL%%libexec/nut/optiups
+%%NUT_SERIAL%%libexec/nut/powercom
+%%NUT_SERIAL%%libexec/nut/powerpanel
+%%NUT_SERIAL%%libexec/nut/rhino
+%%NUT_SERIAL%%libexec/nut/safenet
%%NUT_SNMP%%libexec/nut/snmp-ups
-libexec/nut/skel
-libexec/nut/solis
-libexec/nut/tripplite
+%%NUT_SERIAL%%libexec/nut/skel
+%%NUT_SERIAL%%libexec/nut/solis
+%%NUT_SERIAL%%libexec/nut/tripplite
%%NUT_USB%%libexec/nut/tripplite_usb
-libexec/nut/tripplitesu
-libexec/nut/upscode2
+%%NUT_SERIAL%%libexec/nut/tripplitesu
+%%NUT_SERIAL%%libexec/nut/upscode2
libexec/nut/upsdrvctl
%%NUT_USB%%libexec/nut/usbhid-ups
-libexec/nut/victronups
-%%NUT_LIB%%libdata/pkgconfig/libupsclient.pc
+%%NUT_SERIAL%%libexec/nut/victronups
+%%NUT_DEVEL%%libdata/pkgconfig/libupsclient.pc
sbin/upsd
sbin/upsmon
sbin/upssched
-%%NUT_CGI%%%%CGIDIR%%/nut/upsimage.cgi
-%%NUT_CGI%%%%CGIDIR%%/nut/upsset.cgi
-%%NUT_CGI%%%%CGIDIR%%/nut/upsstats.cgi
+%%NUT_CGI%%%%CGIDIR%%/upsimage.cgi
+%%NUT_CGI%%%%CGIDIR%%/upsset.cgi
+%%NUT_CGI%%%%CGIDIR%%/upsstats.cgi
%%NUT_CGI%%%%CGIETCDIR%%/hosts.conf.sample
%%NUT_CGI%%%%CGIETCDIR%%/upsset.conf.sample
%%NUT_CGI%%%%CGIETCDIR%%/upsstats.html.sample
%%NUT_CGI%%%%CGIETCDIR%%/upsstats-single.html.sample
-%%NUT_CGI%%%%WWWDIR%%/nut/bottom.html
-%%NUT_CGI%%%%WWWDIR%%/nut/header.html
-%%NUT_CGI%%%%WWWDIR%%/nut/index.html
-%%NUT_CGI%%%%WWWDIR%%/nut/nut-banner.png
+%%NUT_CGI%%%%WWWDIR%%/bottom.html
+%%NUT_CGI%%%%WWWDIR%%/header.html
+%%NUT_CGI%%%%WWWDIR%%/index.html
+%%NUT_CGI%%%%WWWDIR%%/nut-banner.png
@dirrmtry etc/nut
-@dirrmtry lib/pkgconfig
+@dirrmtry libdata/pkgconfig
@dirrmtry libexec/nut
@dirrmtry %%STATEDIR%%
-%%NUT_CGI%%@dirrm %%CGIDIR%%/nut
-%%NUT_CGI%%@dirrmtry %%CGIDIR%%
-%%NUT_CGI%%@dirrm %%WWWDIR%%/nut
-%%NUT_CGI%%@dirrmtry %%WWWDIR%%
+%%NUT_CGI%%@dirrm %%CGIDIR%%
+%%NUT_CGI%%@dirrm %%WWWDIR%%