aboutsummaryrefslogtreecommitdiff
path: root/sysutils/nut/Makefile
diff options
context:
space:
mode:
authorCy Schubert <cy@FreeBSD.org>2014-07-04 00:30:45 +0000
committerCy Schubert <cy@FreeBSD.org>2014-07-04 00:30:45 +0000
commit1261ab9470d3b27700cd81cd7020d4b3af86b962 (patch)
treec85c760f37600ee42bc511dff3625b2a6e1f3ff3 /sysutils/nut/Makefile
parent7603768a878c1346f1c9d922ca2768bba434983b (diff)
downloadports-1261ab9470d3b27700cd81cd7020d4b3af86b962.tar.gz
ports-1261ab9470d3b27700cd81cd7020d4b3af86b962.zip
Notes
Diffstat (limited to 'sysutils/nut/Makefile')
-rw-r--r--sysutils/nut/Makefile86
1 files changed, 17 insertions, 69 deletions
diff --git a/sysutils/nut/Makefile b/sysutils/nut/Makefile
index a54e0624066f..494a842e525f 100644
--- a/sysutils/nut/Makefile
+++ b/sysutils/nut/Makefile
@@ -2,14 +2,13 @@
# $FreeBSD$
PORTNAME= nut
-PORTVERSION= 2.6.5
-PORTREVISION= 1
+PORTVERSION= 2.7.2
CATEGORIES= sysutils
MASTER_SITES= http://www.networkupstools.org/source/${PORTVERSION:R}/
DISTFILES= ${DISTNAME}${EXTRACT_SUFX} ${DISTNAME}${EXTRACT_SUFX}.sig
EXTRACT_ONLY= ${DISTNAME}${EXTRACT_SUFX}
-MAINTAINER= itetcu@FreeBSD.org
+MAINTAINER= cy@FreeBSD.org
COMMENT= Network UPS Tools
USE_AUTOTOOLS= autoconf
@@ -20,8 +19,10 @@ USES= gmake pkgconfig
NUT_USER?= uucp
NUT_GROUP?= uucp
STATEDIR?= /var/db/nut
+PLIST_SUB+= NUT_USER=${NUT_USER}
+PLIST_SUB+= NUT_GROUP=${NUT_GROUP}
-OPTIONS_DEFINE= SERIAL USB SNMP NEON PDU HAL CGI BASH
+OPTIONS_DEFINE= SERIAL USB SNMP NEON PDU CGI BASH
OPTIONS_DEFAULT=SERIAL USB SNMP NEON
SERIAL_DESC= SERIAL support
@@ -36,27 +37,8 @@ USE_RC_SUBR= nut nut_upsmon nut_upslog
SUB_LIST+= STATEDIR=${STATEDIR}
PLIST_SUB+= STATEDIR=${STATEDIR}
-MAN3= nutscan.3 nutscan_add_device_to_device.3 \
- nutscan_add_option_to_device.3 nutscan_cidr_to_ip.3 \
- nutscan_display_parsable.3 nutscan_display_ups_conf.3 \
- nutscan_free_device.3 nutscan_init.3 nutscan_new_device.3 \
- nutscan_scan_avahi.3 nutscan_scan_ipmi.3 nutscan_scan_nut.3 \
- nutscan_scan_snmp.3 nutscan_scan_usb.3 nutscan_scan_xml_http.3 \
- 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
-
-MAN5= nut.conf.5 ups.conf.5 upsd.conf.5 upsd.users.5 upsmon.conf.5 \
- upssched.conf.5
-
-MAN8= nut-recorder.8 nut-scanner.8 nutupsdrv.8 upsc.8 \
- upscmd.8 upsd.8 upsdrvctl.8 upslog.8 upsmon.8 upsrw.8 upssched.8
-
PORTDOCS= *
-NO_STAGE= yes
.include <bsd.port.options.mk>
CONFIGURE_ARGS= --sysconfdir=${PREFIX}/etc/nut \
@@ -73,9 +55,7 @@ CONFIGURE_ARGS= --sysconfdir=${PREFIX}/etc/nut \
--with-dev
.if ${PORT_OPTIONS:MCGI}
-LIB_DEPENDS+= gd:${PORTSDIR}/graphics/gd
-MAN5+= hosts.conf.5 upsset.conf.5 upsstats.html.5
-MAN8+= upsset.cgi.8 upsstats.cgi.8 upsimage.cgi.8
+LIB_DEPENDS+= libgd.so:${PORTSDIR}/graphics/gd
CGIDIR?= ${PREFIX}/www/cgi-bin/${PORTNAME}
CGIDIR_REL?= ${CGIDIR:S,^${PREFIX}/,,}
CONFIGURE_ARGS+= --with-cgi --with-cgipath=${CGIDIR} \
@@ -92,13 +72,6 @@ PLIST_SUB+= NUT_CGI="@comment "
.if ${PORT_OPTIONS:MSERIAL}
CONFIGURE_ARGS+= --with-serial
-MAN8+= apcsmart.8 apcsmart-old.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 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
@@ -108,7 +81,6 @@ PLIST_SUB+= NUT_SERIAL="@comment "
.if ${PORT_OPTIONS:MUSB}
#EXTRA_PATCHES= ${FILESDIR}/extra-patch-m4_nut_check_libusb.m4
CONFIGURE_ARGS+= --with-usb=auto
-MAN8+= bcmxcp_usb.8 richcomm_usb.8 tripplite_usb.8 usbhid-ups.8
PLIST_SUB+= NUT_USB=""
.else
CONFIGURE_ARGS+= --without-usb
@@ -116,9 +88,8 @@ PLIST_SUB+= NUT_USB="@comment "
.endif
.if ${PORT_OPTIONS:MSNMP}
-LIB_DEPENDS+= netsnmp.30:${PORTSDIR}/net-mgmt/net-snmp
+LIB_DEPENDS+= libnetsnmp.so:${PORTSDIR}/net-mgmt/net-snmp
CONFIGURE_ARGS+= --with-snmp
-MAN8+= snmp-ups.8
PLIST_SUB+= NUT_SNMP=""
.else
CONFIGURE_ARGS+= --without-snmp
@@ -126,9 +97,8 @@ PLIST_SUB+= NUT_SNMP="@comment "
.endif
.if ${PORT_OPTIONS:MNEON}
-LIB_DEPENDS+= neon.27:${PORTSDIR}/www/neon29
+LIB_DEPENDS+= libneon.so:${PORTSDIR}/www/neon29
CONFIGURE_ARGS+= --with-neonxml
-MAN8+= netxml-ups.8
PLIST_SUB+= NUT_NEON=""
.else
CONFIGURE_ARGS+= --without-neonxml
@@ -137,29 +107,14 @@ PLIST_SUB+= NUT_NEON="@comment "
.endif
.if ${PORT_OPTIONS:MPDU}
-LIB_DEPENDS+= powerman.0:${PORTSDIR}/sysutils/powerman
+LIB_DEPENDS+= libpowerman.so:${PORTSDIR}/sysutils/powerman
CONFIGURE_ARGS+= --with-powerman
-MAN8+= powerman-pdu.8
PLIST_SUB+= NUT_PDU=""
.else
CONFIGURE_ARGS+= --without-powerman
PLIST_SUB+= NUT_PDU="@comment "
.endif
-.if ${PORT_OPTIONS:MHAL}
-. if empty(PORT_OPTIONS:MUSB)
-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 \
- --with-hal-callouts-path=${PREFIX}/libexec
-#MAN8+=
-PLIST_SUB+= NUT_HAL=""
-.else
-CONFIGURE_ARGS+= --without-hal
-PLIST_SUB+= NUT_HAL="@comment "
-.endif
-
.if ${PORT_OPTIONS:MBASH}
RUN_DEPENDS+= ${LOCALBASE}/share/bash-completion/bash_completion.sh:${PORTSDIR}/shells/bash-completion
PLIST_SUB+= BASH=""
@@ -167,28 +122,21 @@ PLIST_SUB+= BASH=""
PLIST_SUB+= BASH="@comment "
.endif
-post-patch:
- @${REINPLACE_CMD} -e 's|<hal/|<|' ${WRKSRC}/drivers/main-hal.c ${WRKSRC}/drivers/dstate-hal.c ${WRKSRC}/drivers/dstate-hal.h
- @${REINPLACE_CMD} -e 's|/usr/share|${LOCALBASE}/share| ; s|$${datarootdir}|${PREFIX}/share|' ${WRKSRC}/m4/nut_check_libhal.m4
-
pre-install:
- @${MKDIR} ${PREFIX}/libexec/nut
- @${MKDIR} ${STATEDIR}
- @${CHOWN} ${NUT_USER}:${NUT_GROUP} ${STATEDIR}
- @${CHMOD} 0750 ${STATEDIR}
+ @${MKDIR} ${STAGEDIR}${PREFIX}/libexec/nut
.if ${PORT_OPTIONS:MDOCS}
post-install:
.if ${PORT_OPTIONS:MBASH}
- @${MKDIR} ${PREFIX}/etc/bash_completion.d/
- ${INSTALL_DATA} ${WRKSRC}/scripts/misc/nut.bash_completion ${PREFIX}/etc/bash_completion.d/
+ @${MKDIR} ${STAGEDIR}${PREFIX}/etc/bash_completion.d/
+ ${INSTALL_DATA} ${WRKSRC}/scripts/misc/nut.bash_completion ${STAGEDIR}${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.txt ${DOCSDIR}
+ @${MKDIR} ${STAGEDIR}${DOCSDIR}/cables
+ ${INSTALL_DATA} ${WRKSRC}/docs/cables/*.txt ${STAGEDIR}${DOCSDIR}/cables
+ ${INSTALL_DATA} ${WRKSRC}/docs/*.txt ${STAGEDIR}${DOCSDIR}
+ ${INSTALL_DATA} ${WRKSRC}/docs/FAQ.txt ${STAGEDIR}${DOCSDIR}
.for file in AUTHORS COPYING ChangeLog INSTALL MAINTAINERS NEWS README UPGRADING
- ${INSTALL_DATA} ${WRKSRC}/${file} ${DOCSDIR}
+ ${INSTALL_DATA} ${WRKSRC}/${file} ${STAGEDIR}${DOCSDIR}
.endfor
.endif