summaryrefslogtreecommitdiffstats
path: root/sysutils/nut22/Makefile
diff options
context:
space:
mode:
authorbp <bp@FreeBSD.org>2000-01-11 11:55:48 +0000
committerbp <bp@FreeBSD.org>2000-01-11 11:55:48 +0000
commit327057a0fb65e97fdf7add79a1f76de1e92c3890 (patch)
tree927fb491b6da92b269dd4328f3005956ee2ae3a2 /sysutils/nut22/Makefile
parent181b051358e152d86a57fd922803d1c205ab661c (diff)
downloadFreeBSD-ports-327057a0fb65e97fdf7add79a1f76de1e92c3890.zip
FreeBSD-ports-327057a0fb65e97fdf7add79a1f76de1e92c3890.tar.gz
New port for 'nut' package. It supports wide variety of UPS hardware
(including Smart and Back UPS for APPC), has ability to shutdown multiple hosts without additional hardware and provides CGI scripts to monitor UPS status via WEB interface.
Diffstat (limited to 'sysutils/nut22/Makefile')
-rw-r--r--sysutils/nut22/Makefile64
1 files changed, 64 insertions, 0 deletions
diff --git a/sysutils/nut22/Makefile b/sysutils/nut22/Makefile
new file mode 100644
index 0000000..55b81bd
--- /dev/null
+++ b/sysutils/nut22/Makefile
@@ -0,0 +1,64 @@
+# New ports collection makefile for: nut
+# Version required: nut-0.42.1
+# Date created: 08 Jan 2000
+# Whom: Boris Popov <bp@freebsd.org>
+#
+# $FreeBSD$
+#
+
+DISTNAME= nut-0.42.1
+CATEGORIES= sysutils
+MASTER_SITES= http://www.exploits.org/nut/release/
+
+MAINTAINER= bp@butya.kz
+
+.if defined(CGI)
+LIB_DEPENDS= gd:${PORTSDIR}/graphics/gd
+.endif
+
+GNU_CONFIGURE= yes
+CONFIGURE_ARGS= --enable-celsius --sysconfdir=${PREFIX}/etc/nut \
+ --with-uid=65534 --with-gid=68
+ALL_TARGET= all
+
+PLIST= ${WRKDIR}/PLIST.DYN
+
+NDOCDIR= ${PREFIX}/share/doc/nut
+
+.if defined(CGI)
+NCGIDIR= ${PREFIX}/share/nut/cgi
+ALL_TARGET+= cgi
+.endif
+
+pre-fetch:
+.if !defined(CGI)
+ @${ECHO_MSG} "Type \"make CGI=yes\" if you want to build CGI scripts."
+.endif
+
+pre-install:
+ @cp ${PKGDIR}/PLIST ${WRKDIR}/PLIST.DYN
+.if !defined(NOPORSDOCS)
+ @cat ${PKGDIR}/PLIST.DOC >> ${WRKDIR}/PLIST.DYN
+.endif
+.if defined(CGI)
+ @cat ${PKGDIR}/PLIST.CGI >> ${WRKDIR}/PLIST.DYN
+.endif
+
+post-install:
+ @${SED} -e "/%%PREFIX%%/s##${PREFIX}#g" ${FILESDIR}/upsd.sh.sample \
+ >${PREFIX}/etc/rc.d/upsd.sh.sample
+ @${CHMOD} 0755 ${PREFIX}/etc/rc.d/upsd.sh.sample
+.if !defined(NOPORTDOCS)
+ @if ! [ -d ${NDOCDIR} ]; then ${MKDIR} ${NDOCDIR}; fi
+ ${INSTALL_DATA} ${WRKSRC}/docs/* ${NDOCDIR}
+ ${INSTALL_DATA} ${WRKSRC}/README ${NDOCDIR}
+ ${INSTALL_DATA} ${WRKSRC}/QUICKSTART ${NDOCDIR}
+.endif
+.if defined(CGI)
+ @if ! [ -d ${NCGIDIR} ]; then ${MKDIR} ${NCGIDIR}; fi
+ ${INSTALL_DATA} ${WRKSRC}/clients/*.cgi ${NCGIDIR}
+ @${ECHO_MSG} "Look in ${NCGIDIR} for cgi scripts."
+.endif
+ @${ECHO_MSG} "Look in ${NDOCDIR} for documentation."
+
+.include <bsd.port.mk>
OpenPOWER on IntegriCloud