aboutsummaryrefslogtreecommitdiff
path: root/sysutils/nut22/Makefile
diff options
context:
space:
mode:
authorDoug Barton <dougb@FreeBSD.org>2003-09-10 11:18:29 +0000
committerDoug Barton <dougb@FreeBSD.org>2003-09-10 11:18:29 +0000
commitd4e38ac9d160c446e99f2d16ee290ed2af421aba (patch)
tree386c7fb7173f9c115a24b4bd72849a683c1b1701 /sysutils/nut22/Makefile
parent1361ea7c38c0f14293eaa81fdbec58e95005543a (diff)
downloadports-d4e38ac9d160c446e99f2d16ee290ed2af421aba.tar.gz
ports-d4e38ac9d160c446e99f2d16ee290ed2af421aba.zip
Upgrade to version 1.4.0, the latest stable version.
Re-enable the CGI programs, now that they build. Kind assistance provided by: Guido Falsi <mad@madpilot.net>
Notes
Notes: svn path=/head/; revision=88927
Diffstat (limited to 'sysutils/nut22/Makefile')
-rw-r--r--sysutils/nut22/Makefile39
1 files changed, 29 insertions, 10 deletions
diff --git a/sysutils/nut22/Makefile b/sysutils/nut22/Makefile
index 914958ba37ce..66b54ea0e874 100644
--- a/sysutils/nut22/Makefile
+++ b/sysutils/nut22/Makefile
@@ -6,7 +6,7 @@
#
PORTNAME= nut
-PORTVERSION= 1.2.1
+PORTVERSION= 1.4.0
CATEGORIES= sysutils
MASTER_SITES= http://www.exploits.org/nut/release/${PORTVERSION:R}/
@@ -26,20 +26,41 @@ MAN5= ups.conf.5 upsd.conf.5 upsd.users.5 upsmon.conf.5 \
MAN8= apcsmart.8 bcmxcp.8 belkin.8 bestferrups801-807.8 \
bestfortress.8 bestuferrups.8 bestups.8 cyberpower.8 etapro.8 \
everups.8 fentonups.8 genericups.8 hp.8 isbmex.8 liebert.8 \
- masterguard.8 mge-ellipse.8 mge-utalk.8 microdowell.8 newapc.8 \
+ masterguard.8 mge-shut.8 mge-utalk.8 microdowell.8 newapc.8 \
nutupsdrv.8 oneac.8 powercom.8 powernet.8 sec.8 sms.8 \
- snmp-ups.8 tripplite.8 upsc.8 upscmd.8 upsd.8 upsdrvctl.8 \
- upslog.8 upsmon.8 upsrw.8 upssched.8 victronups.8
+ snmp-ups.8 tripplite.8 tripplitesu.8 upsc.8 upscmd.8 upsd.8 \
+ upsdrvctl.8 upslog.8 upsmon.8 upsrw.8 upssched.8 victronups.8
ALL_TARGET= all
+INSTALL_TARGET= install
-pre-fetch:
-.if defined(CGI) && !defined(BATCH) && !defined(PACKAGE_BUILDING)
- @${ECHO_MSG} 'CGI clients are currently disabled because they require'
- @${ECHO_MSG} 'a later version of the gd2 library than we have.'
+.if defined(WITH_NUT_CGI)
+LIB_DEPENDS= gd.4:${PORTSDIR}/graphics/gd
+ALL_TARGET+= cgi
+INSTALL_TARGET+=install-cgi
+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
+.else
+CGIDIR?= www/cgi-bin
+.endif
+CONFIGURE_ARGS+= --with-cgi --with-cgipath=${PREFIX}/${CGIDIR}/nut \
+ --with-gd-includes=-I${PREFIX}/include \
+ --with-gd-libs="-L${PREFIX}/lib -lgd"
+PLIST_SUB+= CGIFILES="${CGIDIR}/nut/"
+PLIST_SUB+= CGIDIRRM="@dirrm ${CGIDIR}/nut"
+PLIST_SUB+= CGIETC="etc/nut/"
+.else
+PLIST_SUB+= CGIFILES="@comment "
+PLIST_SUB+= CGIDIRRM="@comment "
+PLIST_SUB+= CGIETC="@comment "
.endif
pre-install:
+.if !defined(WITH_NUT_CGI) && !defined(BATCH) && !defined(PACKAGE_BUILDING)
+ @${ECHO_MSG} "Type \"make -DWITH_NUT_CGI\" if you want to build CGI scripts."
+.endif
@${MKDIR} ${PREFIX}/libexec/nut
@${MKDIR} /var/db/nut
@${CHOWN} uucp /var/db/nut
@@ -52,8 +73,6 @@ post-install:
@${MKDIR} ${DOCSDIR}/cables
@${MKDIR} ${DOCSDIR}/drivers
${INSTALL_DATA} ${WRKSRC}/docs/cables/*.txt ${DOCSDIR}/cables
- ${INSTALL_DATA} ${WRKSRC}/docs/drivers/*.txt ${DOCSDIR}/drivers
- ${INSTALL_DATA} ${WRKSRC}/docs/drivers/README ${DOCSDIR}/drivers
${INSTALL_DATA} ${WRKSRC}/docs/*.txt ${DOCSDIR}
${INSTALL_DATA} ${WRKSRC}/docs/FAQ ${DOCSDIR}
${INSTALL_DATA} ${WRKSRC}/docs/driver.list ${DOCSDIR}