2010-11-06 12:07:00 -04:00
|
|
|
# $OpenBSD: Makefile,v 1.41 2010/11/06 16:07:00 espie 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
|
|
|
|
2010-03-31 18:11:11 -04:00
|
|
|
DISTNAME= nut-2.4.3
|
2010-10-03 18:21:49 -04:00
|
|
|
REVISION-main= 1
|
|
|
|
REVISION-cgi= 1
|
|
|
|
REVISION-snmp= 1
|
|
|
|
|
|
|
|
PKGNAME-main= ${DISTNAME}
|
2010-03-31 18:11:11 -04:00
|
|
|
PKGNAME-cgi= ${DISTNAME:S/-/-cgi-/}
|
2010-10-03 18:21:49 -04:00
|
|
|
PKGNAME-snmp= ${DISTNAME:S/-/-snmp-/}
|
|
|
|
|
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
|
|
|
|
2010-10-03 18:21:49 -04:00
|
|
|
MAINTAINER= Stuart Henderson <sthen@openbsd.org>
|
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
|
|
|
|
2010-10-03 18:21:49 -04:00
|
|
|
SHARED_LIBS+= upsclient 1.0
|
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
|
2010-03-20 13:11:40 -04:00
|
|
|
|
|
|
|
WANTLIB += c crypto
|
|
|
|
WANTLIB-main += ${WANTLIB}
|
2010-10-03 18:21:49 -04:00
|
|
|
WANTLIB-main += expat m ssl z asn1 gssapi krb5 neon usb
|
|
|
|
|
|
|
|
MASTER_SITES= ${HOMEPAGE}source/2.4/
|
2010-03-20 13:11:40 -04:00
|
|
|
|
|
|
|
MODULES= devel/gettext
|
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
|
2010-10-19 03:43:00 -04:00
|
|
|
USE_GROFF = Yes
|
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
|
|
|
|
2010-03-20 13:11:40 -04:00
|
|
|
LIB_DEPENDS-main= ${MODGETTEXT_LIB_DEPENDS} \
|
2010-10-03 18:21:49 -04:00
|
|
|
::devel/libusb \
|
|
|
|
::net/neon
|
2008-01-30 15:55:59 -05:00
|
|
|
|
2007-05-18 08:22:45 -04:00
|
|
|
PREFIX-cgi= ${WEB_ROOT}
|
2010-11-06 12:07:00 -04:00
|
|
|
WANTLIB-cgi= ${MODGETTEXT_WANTLIB} \
|
|
|
|
X11 Xau Xdmcp c crypto expat fontconfig freetype gd
|
2010-10-03 18:21:49 -04:00
|
|
|
WANTLIB-cgi+= jpeg m png pthread-stubs ssl upsclient xcb z
|
2006-11-25 14:36:43 -05:00
|
|
|
|
2010-10-03 18:21:49 -04:00
|
|
|
WANTLIB-snmp= ${WANTLIB} netsnmp
|
|
|
|
LIB_DEPENDS-snmp= ::net/net-snmp
|
2010-03-20 13:11:40 -04:00
|
|
|
RUN_DEPENDS-snmp= # empty
|
|
|
|
|
2010-10-03 18:21:49 -04:00
|
|
|
LIB_DEPENDS-cgi= ${LIB_DEPENDS} \
|
|
|
|
::graphics/jpeg \
|
|
|
|
::graphics/gd \
|
|
|
|
::sysutils/nut,-main
|
2010-03-20 13:11:40 -04:00
|
|
|
RUN_DEPENDS-cgi= # empty
|
2006-11-25 14:36:43 -05:00
|
|
|
|
|
|
|
.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
|
|
|
|
|
2010-03-03 15:39:15 -05:00
|
|
|
pre-configure:
|
|
|
|
${SUBST_CMD} ${WRKSRC}/conf/upssched.conf.sample.in
|
|
|
|
|
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>
|