2000-01-11 11:55:48 +00:00
|
|
|
# New ports collection makefile for: nut
|
|
|
|
# Date created: 08 Jan 2000
|
|
|
|
# Whom: Boris Popov <bp@freebsd.org>
|
|
|
|
#
|
|
|
|
# $FreeBSD$
|
|
|
|
#
|
|
|
|
|
2000-04-09 19:09:11 +00:00
|
|
|
PORTNAME= nut
|
2000-07-18 04:56:46 +00:00
|
|
|
PORTVERSION= 0.44.0
|
2000-01-11 11:55:48 +00:00
|
|
|
CATEGORIES= sysutils
|
|
|
|
MASTER_SITES= http://www.exploits.org/nut/release/
|
|
|
|
|
|
|
|
MAINTAINER= bp@butya.kz
|
|
|
|
|
|
|
|
.if defined(CGI)
|
2000-08-08 03:15:52 +00:00
|
|
|
LIB_DEPENDS= gd.1:${PORTSDIR}/graphics/gd
|
2000-01-11 11:55:48 +00:00
|
|
|
.endif
|
|
|
|
|
|
|
|
GNU_CONFIGURE= yes
|
2000-01-29 01:54:28 +00:00
|
|
|
CONFIGURE_ARGS= --sysconfdir=${PREFIX}/etc/nut \
|
2000-07-18 04:56:46 +00:00
|
|
|
--with-cgipath=${PREFIX}/share/nut/cgi \
|
|
|
|
--with-modelpath=${PREFIX}/sbin \
|
|
|
|
--with-uid=65534 --with-gid=68
|
|
|
|
|
2000-01-11 11:55:48 +00:00
|
|
|
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:
|
2000-01-29 01:54:28 +00:00
|
|
|
@${SED} -e "/%%PREFIX%%/s##${PREFIX}#g" \
|
|
|
|
${WRKSRC}/scripts/FreeBSD/upsd.sh.sample \
|
2000-01-11 11:55:48 +00:00
|
|
|
>${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
|
2000-07-18 04:56:46 +00:00
|
|
|
@if ! [ -d ${NDOCDIR}/cables ]; then ${MKDIR} ${NDOCDIR}/cables; fi
|
|
|
|
${INSTALL_DATA} ${WRKSRC}/docs/cables/*.txt ${NDOCDIR}/cables
|
|
|
|
${INSTALL_DATA} ${WRKSRC}/docs/*.txt ${NDOCDIR}
|
|
|
|
${INSTALL_DATA} ${WRKSRC}/docs/FAQ ${NDOCDIR}
|
|
|
|
${INSTALL_DATA} ${WRKSRC}/docs/Changes.trust ${NDOCDIR}
|
2000-01-11 11:55:48 +00:00
|
|
|
${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>
|