aboutsummaryrefslogtreecommitdiff
path: root/sysutils/nut/Makefile
diff options
context:
space:
mode:
authorIon-Mihai Tetcu <itetcu@FreeBSD.org>2011-08-02 17:05:43 +0000
committerIon-Mihai Tetcu <itetcu@FreeBSD.org>2011-08-02 17:05:43 +0000
commit1a36a781f49bd007b53ede427e0ef2b2cb67f3fc (patch)
tree0159104327573554ca7cdff79caab02b89f80f79 /sysutils/nut/Makefile
parentd389c2f0a84bafbdb01efe775c024577868cdb1f (diff)
Notes
Diffstat (limited to 'sysutils/nut/Makefile')
-rw-r--r--sysutils/nut/Makefile55
1 files changed, 29 insertions, 26 deletions
diff --git a/sysutils/nut/Makefile b/sysutils/nut/Makefile
index 54a3e97a5603..e607b3418555 100644
--- a/sysutils/nut/Makefile
+++ b/sysutils/nut/Makefile
@@ -6,8 +6,7 @@
#
PORTNAME= nut
-PORTVERSION= 2.4.1
-PORTREVISION= 7
+PORTVERSION= 2.6.1
CATEGORIES= sysutils
MASTER_SITES= http://www.networkupstools.org/source/${PORTVERSION:R}/
DISTFILES= ${DISTNAME}${EXTRACT_SUFX} ${DISTNAME}${EXTRACT_SUFX}.sig
@@ -26,14 +25,14 @@ NUT_USER?= uucp
NUT_GROUP?= uucp
STATEDIR?= /var/db/nut
-OPTIONS= SERIAL "SERIAL support" on \
- USB "USB support" on \
- SNMP "SNMP support" on \
+OPTIONS= SERIAL "SERIAL support" on \
+ USB "USB support" on \
+ SNMP "SNMP support" on \
NEON "NEON XML/HTTP support" on \
- PDU "Powerman PDU support" off \
- HAL "HAL support" off \
- IPV6 "IPV6 support" on \
- CGI "Web CGI interface" off
+ PDU "Powerman PDU support" off \
+ HAL "HAL support" off \
+ CGI "Web CGI interface" off \
+ BASH "Bash Completion support" off
USE_RC_SUBR= nut.sh nut_upsmon.sh nut_upslog.sh
SUB_LIST+= STATEDIR=${STATEDIR}
@@ -45,7 +44,7 @@ MAN3= upscli_connect.3 upscli_disconnect.3 upscli_fd.3 \
upscli_splitname.3 upscli_ssl.3 upscli_strerror.3 \
upscli_upserror.3 upsclient.3
-MAN5= ups.conf.5 upsd.conf.5 upsd.users.5 upsmon.conf.5 \
+MAN5= nut.conf.5 ups.conf.5 upsd.conf.5 upsd.users.5 upsmon.conf.5 \
upssched.conf.5
MAN8= nutupsdrv.8 upsc.8 upscmd.8 upsd.8 upsdrvctl.8 \
@@ -76,8 +75,8 @@ 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"
+ --with-gd-includes=-I${LOCALBASE}/include \
+ --with-gd-libs="-L${LOCALBASE}/lib -lgd"
PLIST_SUB+= NUT_CGI=""
PLIST_SUB+= CGIDIR="${CGIDIR_REL}"
PLIST_SUB+= CGIETCDIR="etc/nut/"
@@ -88,13 +87,13 @@ PLIST_SUB+= NUT_CGI="@comment "
.if !defined(WITHOUT_SERIAL)
CONFIGURE_ARGS+= --with-serial
-MAN8+= apcsmart.8 bcmxcp.8 belkin.8 belkinunv.8 \
- bestuferrups.8 bestups.8 bestfcom.8 blazer.8 cyberpower.8 \
+MAN8+= apcsmart.8 bestfortress.8 bcmxcp.8 belkin.8 belkinunv.8 \
+ bestuferrups.8 bestups.8 bestfcom.8 blazer.8 clone.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 microdowell.8 oneac.8 optiups.8 \
- powercom.8 powerpanel.8 rhino.8 safenet.8 solis.8 tripplite.8 \
- tripplitesu.8 upscode2.8 victronups.8
+ isbmex.8 ivtscd.8 liebert.8 liebert-esp2.8 masterguard.8 \
+ metasys.8 mge-shut.8 mge-utalk.8 microdowell.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
@@ -105,11 +104,10 @@ PLIST_SUB+= NUT_SERIAL="@comment "
. if ${OSVERSION} < 800069
LIB_DEPENDS+= usb-0.1.8:${PORTSDIR}/devel/libusb
. else
-EXTRA_PATCHES= ${FILESDIR}/extra-patch-m4_nut_check_libusb.m4
+#EXTRA_PATCHES= ${FILESDIR}/extra-patch-m4_nut_check_libusb.m4
. endif
CONFIGURE_ARGS+= --with-usb=auto
-MAN8+= bcmxcp_usb.8 megatec_usb.8 richcomm_usb.8 tripplite_usb.8 \
- usbhid-ups.8
+MAN8+= bcmxcp_usb.8 richcomm_usb.8 tripplite_usb.8 usbhid-ups.8
PLIST_SUB+= NUT_USB=""
.else
CONFIGURE_ARGS+= --without-usb
@@ -151,7 +149,8 @@ PLIST_SUB+= NUT_PDU="@comment "
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
+CONFIGURE_ARGS+= --with-hal \
+ --with-hal-callouts-path=${PREFIX}/libexec
#MAN8+=
PLIST_SUB+= NUT_HAL=""
.else
@@ -159,10 +158,11 @@ CONFIGURE_ARGS+= --without-hal
PLIST_SUB+= NUT_HAL="@comment "
.endif
-.if !defined(WITHOUT_IPV6)
-CONFIGURE_ARGS+= --with-ipv6
+.if defined(WITH_BASH)
+RUN_DEPENDS+= ${LOCALBASE}/bin/bash_completion.sh:${PORTSDIR}/shells/bash-completion
+PLIST_SUB+= BASH=""
.else
-CONFIGURE_ARGS+= --without-ipv6
+PLIST_SUB+= BASH="@comment "
.endif
post-patch:
@@ -177,10 +177,13 @@ pre-install:
.if !defined(NOPORTDOCS)
post-install:
+.if defined(WITH_BASH)
+ ${INSTALL_DATA} ${WRKSRC}/scripts/misc/nut.bash_completion ${PREFIX}/etc/bash_completion.d/
+.endif
@${MKDIR} ${DOCSDIR}/cables
${INSTALL_DATA} ${WRKSRC}/docs/cables/*.txt ${DOCSDIR}/cables
${INSTALL_DATA} ${WRKSRC}/docs/*.txt ${DOCSDIR}
- ${INSTALL_DATA} ${WRKSRC}/docs/FAQ ${DOCSDIR}
+ ${INSTALL_DATA} ${WRKSRC}/docs/FAQ.txt ${DOCSDIR}
.for file in AUTHORS COPYING ChangeLog INSTALL MAINTAINERS NEWS README UPGRADING
${INSTALL_DATA} ${WRKSRC}/${file} ${DOCSDIR}
.endfor