2000-01-11 12:55:48 +01:00
|
|
|
# New ports collection makefile for: nut
|
|
|
|
# Date created: 08 Jan 2000
|
|
|
|
# Whom: Boris Popov <bp@freebsd.org>
|
|
|
|
#
|
|
|
|
# $FreeBSD$
|
|
|
|
#
|
|
|
|
|
2000-04-09 21:09:11 +02:00
|
|
|
PORTNAME= nut
|
2001-07-02 03:40:11 +02:00
|
|
|
PORTVERSION= 0.45.0
|
2000-01-11 12:55:48 +01:00
|
|
|
CATEGORIES= sysutils
|
|
|
|
MASTER_SITES= http://www.exploits.org/nut/release/
|
|
|
|
|
2001-10-07 09:19:05 +02:00
|
|
|
MAINTAINER= DougB@FreeBSD.org
|
2000-01-11 12:55:48 +01:00
|
|
|
|
|
|
|
.if defined(CGI)
|
2001-03-23 14:32:11 +01:00
|
|
|
LIB_DEPENDS= gd.2:${PORTSDIR}/graphics/gd
|
2000-01-11 12:55:48 +01:00
|
|
|
.endif
|
|
|
|
|
2001-01-16 18:33:20 +01:00
|
|
|
GNU_CONFIGURE= yes
|
|
|
|
CONFIGURE_ARGS= --sysconfdir=${PREFIX}/etc/nut \
|
2000-07-18 06:56:46 +02:00
|
|
|
--with-cgipath=${PREFIX}/share/nut/cgi \
|
2001-01-04 07:14:59 +01:00
|
|
|
--with-modelpath=${PREFIX}/libexec/nut \
|
2000-10-16 08:09:58 +02:00
|
|
|
--with-statepath=/var/db
|
2000-07-18 06:56:46 +02:00
|
|
|
|
2001-03-23 14:32:11 +01:00
|
|
|
MAN8= powercom.8 apcsmart.8
|
2000-01-11 12:55:48 +01:00
|
|
|
|
2001-03-23 14:32:11 +01:00
|
|
|
ALL_TARGET= all
|
2000-01-11 12:55:48 +01:00
|
|
|
|
|
|
|
NDOCDIR= ${PREFIX}/share/doc/nut
|
|
|
|
|
|
|
|
.if defined(CGI)
|
|
|
|
NCGIDIR= ${PREFIX}/share/nut/cgi
|
|
|
|
ALL_TARGET+= cgi
|
2001-03-23 14:32:11 +01:00
|
|
|
PLIST_SUB+= CGIFILES=""
|
|
|
|
.else
|
|
|
|
PLIST_SUB+= CGIFILES="@comment "
|
2000-01-11 12:55:48 +01:00
|
|
|
.endif
|
|
|
|
|
|
|
|
pre-fetch:
|
|
|
|
.if !defined(CGI)
|
|
|
|
@${ECHO_MSG} "Type \"make CGI=yes\" if you want to build CGI scripts."
|
|
|
|
.endif
|
|
|
|
|
|
|
|
post-install:
|
2000-01-29 02:54:28 +01:00
|
|
|
@${SED} -e "/%%PREFIX%%/s##${PREFIX}#g" \
|
|
|
|
${WRKSRC}/scripts/FreeBSD/upsd.sh.sample \
|
2001-01-04 07:14:59 +01:00
|
|
|
>${PREFIX}/etc/rc.d/nut.sh.sample
|
|
|
|
@${CHMOD} 0755 ${PREFIX}/etc/rc.d/nut.sh.sample
|
2000-01-11 12:55:48 +01:00
|
|
|
.if !defined(NOPORTDOCS)
|
|
|
|
@if ! [ -d ${NDOCDIR} ]; then ${MKDIR} ${NDOCDIR}; fi
|
2000-07-18 06:56:46 +02: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 12:55:48 +01:00
|
|
|
${INSTALL_DATA} ${WRKSRC}/README ${NDOCDIR}
|
2001-07-02 03:40:11 +02:00
|
|
|
${INSTALL_DATA} ${WRKSRC}/INSTALL ${NDOCDIR}
|
2000-01-11 12:55:48 +01:00
|
|
|
.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
|
2001-03-23 14:32:11 +01:00
|
|
|
.if !defined(NOPORTDOCS)
|
2000-01-11 12:55:48 +01:00
|
|
|
@${ECHO_MSG} "Look in ${NDOCDIR} for documentation."
|
2001-03-23 14:32:11 +01:00
|
|
|
.endif
|
2000-01-11 12:55:48 +01:00
|
|
|
|
|
|
|
.include <bsd.port.mk>
|