2009-09-15 13:37:21 -04:00
|
|
|
# $OpenBSD: Makefile,v 1.32 2009/09/15 17:37:22 jasper Exp $
|
2001-05-05 23:58:56 -04:00
|
|
|
|
2007-09-15 17:14:00 -04:00
|
|
|
COMMENT-main= UPS monitoring program supporting many brands
|
|
|
|
COMMENT-cgi= CGIs for monitoring Nut-based UPSs
|
|
|
|
COMMENT-snmp= driver for monitoring UPSs via SNMP
|
2001-02-06 17:24:03 -05:00
|
|
|
|
2009-04-03 11:40:12 -04:00
|
|
|
DISTNAME= nut-2.4.1
|
2009-09-15 13:37:21 -04:00
|
|
|
PKGNAME-main= ${DISTNAME}p0
|
|
|
|
PKGNAME-cgi= ${DISTNAME:S/-/-cgi-/}p0
|
|
|
|
PKGNAME-snmp= ${DISTNAME:S/-/-snmp-/}p0
|
2002-10-14 12:14:33 -04:00
|
|
|
CATEGORIES= sysutils
|
2004-02-09 01:48:48 -05:00
|
|
|
HOMEPAGE= http://www.networkupstools.org/
|
2007-05-18 08:22:45 -04:00
|
|
|
|
2009-04-03 11:40:12 -04:00
|
|
|
SHARED_LIBS+= upsclient 1.0
|
update to nut-2.2.2, which contains the old agiler driver from 2.2.0
(now called agiler-old)
upses such as the below can now work again:
{0x0665, 0x5161, &agiler_old_subdriver}, /* Belkin F6C1200-UNV */
{0x06da, 0x0003, &agiler_old_subdriver}, /* Mustek Powermust */
{0x0f03, 0x0001, &agiler_old_subdriver}, /* Unitek Alpha 1200Sx *
ok sthen@
2008-09-08 15:38:30 -04:00
|
|
|
|
2009-04-03 11:40:12 -04:00
|
|
|
MASTER_SITES= ${HOMEPAGE}source/2.4/
|
2004-02-09 01:48:48 -05:00
|
|
|
|
2009-04-03 11:40:12 -04:00
|
|
|
# GPLv2+, some scripts (not packaged) are GPLv3+
|
2001-02-06 17:24:03 -05:00
|
|
|
PERMIT_PACKAGE_CDROM= Yes
|
|
|
|
PERMIT_PACKAGE_FTP= Yes
|
|
|
|
PERMIT_DISTFILES_CDROM= Yes
|
|
|
|
PERMIT_DISTFILES_FTP= Yes
|
2008-11-13 08:14:51 -05:00
|
|
|
WANTLIB-main= c crypto expat iconv intl m ssl z \
|
|
|
|
asn1 gssapi krb5
|
2008-09-27 13:30:08 -04:00
|
|
|
WANTLIB-snmp= c crypto
|
2001-02-06 17:24:03 -05:00
|
|
|
|
2002-10-14 12:14:33 -04:00
|
|
|
WEB_ROOT= /var/www
|
2004-02-09 01:48:48 -05:00
|
|
|
NUT_USER= _ups
|
2004-02-21 01:16:58 -05:00
|
|
|
NUT_ID= 529
|
2004-10-02 23:13:10 -04:00
|
|
|
SUBST_VARS= WEB_ROOT NUT_USER NUT_ID
|
2004-02-09 01:48:48 -05:00
|
|
|
|
2008-02-03 13:06:41 -05:00
|
|
|
CONFIGURE_STYLE= gnu old
|
2007-05-18 08:22:45 -04:00
|
|
|
CONFIGURE_ARGS+= --sysconfdir=${SYSCONFDIR}/nut \
|
|
|
|
--datadir=${PREFIX}/share/ups \
|
|
|
|
--mandir=${PREFIX}/man \
|
|
|
|
--with-statepath=/var/db/nut \
|
|
|
|
--with-user=${NUT_USER} \
|
2008-01-30 15:55:59 -05:00
|
|
|
--with-group=${NUT_USER} \
|
2007-05-18 08:22:45 -04:00
|
|
|
--with-ssl \
|
|
|
|
--enable-strip
|
2002-10-14 12:14:33 -04:00
|
|
|
|
2008-01-30 15:55:59 -05:00
|
|
|
PSEUDO_FLAVORS= snmp
|
2002-10-14 12:14:33 -04:00
|
|
|
FLAVOR?=
|
2008-01-30 15:55:59 -05:00
|
|
|
MULTI_PACKAGES= -main -cgi
|
2004-10-02 23:13:10 -04:00
|
|
|
.if ${FLAVOR:L:Msnmp}
|
|
|
|
MULTI_PACKAGES+= -snmp
|
|
|
|
.endif
|
2006-11-25 14:36:43 -05:00
|
|
|
|
2008-09-27 13:30:08 -04:00
|
|
|
LIB_DEPENDS-main= usb::devel/libusb \
|
|
|
|
neon::net/neon
|
2008-01-30 15:55:59 -05:00
|
|
|
|
2007-05-18 08:22:45 -04:00
|
|
|
PREFIX-cgi= ${WEB_ROOT}
|
2008-02-03 13:06:41 -05:00
|
|
|
WANTLIB-cgi=
|
2006-11-25 14:36:43 -05:00
|
|
|
|
|
|
|
LIB_DEPENDS-snmp= netsnmp::net/net-snmp
|
|
|
|
|
|
|
|
.if ${MULTI_PACKAGES:M-cgi}
|
2004-10-02 23:13:10 -04:00
|
|
|
BUILD_DEPENDS+= :gd->=1.8.3:graphics/gd
|
2001-02-06 17:24:03 -05:00
|
|
|
|
2007-05-18 08:22:45 -04:00
|
|
|
CONFIGURE_ARGS+= --with-cgi \
|
|
|
|
--with-cgipath="${WEB_ROOT}/cgi-bin/nut" \
|
2008-01-30 15:55:59 -05:00
|
|
|
--with-gd-libs="-L/usr/X11R6/lib -L${PREFIX}/lib \
|
|
|
|
-lgd -lpng -lz -ljpeg -lm -lfreetype -lX11" \
|
2007-05-18 08:22:45 -04:00
|
|
|
--with-gd-includes="-I${PREFIX}/include"
|
2001-02-06 17:24:03 -05:00
|
|
|
.endif
|
|
|
|
|
2008-09-27 13:30:08 -04:00
|
|
|
USE_GMAKE= Yes
|
update to nut-2.2.2, which contains the old agiler driver from 2.2.0
(now called agiler-old)
upses such as the below can now work again:
{0x0665, 0x5161, &agiler_old_subdriver}, /* Belkin F6C1200-UNV */
{0x06da, 0x0003, &agiler_old_subdriver}, /* Mustek Powermust */
{0x0f03, 0x0001, &agiler_old_subdriver}, /* Unitek Alpha 1200Sx *
ok sthen@
2008-09-08 15:38:30 -04:00
|
|
|
USE_LIBTOOL= Yes
|
|
|
|
|
2002-10-28 14:53:43 -05:00
|
|
|
NO_REGRESS= Yes
|
|
|
|
|
2001-02-06 17:24:03 -05:00
|
|
|
post-install:
|
2004-09-26 23:10:24 -04:00
|
|
|
${INSTALL_DATA_DIR} ${PREFIX}/share/doc/nut/
|
2002-10-14 12:14:33 -04:00
|
|
|
cp -R ${WRKSRC}/docs/* ${PREFIX}/share/doc/nut/
|
2004-09-26 23:10:24 -04:00
|
|
|
${INSTALL_DATA_DIR} ${PREFIX}/share/examples/nut/
|
|
|
|
.for file in upsmon.conf upsd.conf upsd.users upssched.conf ups.conf
|
2008-01-30 15:55:59 -05:00
|
|
|
${INSTALL_DATA} ${WRKBUILD}/conf/${file}.sample \
|
|
|
|
${PREFIX}/share/examples/nut/${file}
|
2004-09-26 23:10:24 -04:00
|
|
|
.endfor
|
2002-10-14 12:14:33 -04:00
|
|
|
# Yes, we install the CGI config files even if we're not building CGI support,
|
2004-02-09 01:48:48 -05:00
|
|
|
# it will get properly handled by packaging.
|
2004-09-26 23:10:24 -04:00
|
|
|
${INSTALL_DATA_DIR} ${WRKINST}${WEB_ROOT}/conf/nut/
|
2004-02-09 01:48:48 -05:00
|
|
|
.for file in hosts.conf upsset.conf upsstats.html upsstats-single.html
|
2008-01-30 15:55:59 -05:00
|
|
|
${INSTALL_DATA} ${WRKBUILD}/conf/${file}.sample \
|
|
|
|
${WRKINST}${WEB_ROOT}/conf/nut/${file}.sample
|
2002-10-14 12:14:33 -04:00
|
|
|
.endfor
|
2001-02-06 17:24:03 -05:00
|
|
|
|
|
|
|
.include <bsd.port.mk>
|