2011-03-09 18:32:20 -05:00
|
|
|
# $OpenBSD: Makefile,v 1.45 2011/03/09 23:32:20 sthen 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
|
2011-03-09 18:32:20 -05:00
|
|
|
COMMENT-snmp= driver for monitoring UPS via SNMP
|
|
|
|
COMMENT-xml= driver for monitoring UPS via XML/HTTP
|
2001-02-06 17:24:03 -05:00
|
|
|
|
2011-03-09 06:00:55 -05:00
|
|
|
DISTNAME= nut-2.6.0
|
2011-03-09 18:32:20 -05:00
|
|
|
REVISION-main= 1
|
|
|
|
REVISION-snmp= 0
|
|
|
|
REVISION-cgi= 0
|
2010-10-03 18:21:49 -04:00
|
|
|
|
|
|
|
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-/}
|
2011-03-09 18:32:20 -05:00
|
|
|
PKGNAME-xml= ${DISTNAME:S/-/-xml-/}
|
2010-10-03 18:21:49 -04:00
|
|
|
|
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
|
|
|
|
2011-03-09 18:32:20 -05:00
|
|
|
COMMON = c crypto
|
|
|
|
WANTLIB-main += ${COMMON} m ssl usb
|
|
|
|
WANTLIB-xml += ${COMMON} ${WANTLIB} asn1 expat gssapi krb5 neon ssl z
|
|
|
|
WANTLIB-cgi += ${COMMON} ${WANTLIB} X11 Xau Xdmcp expat fontconfig
|
2011-03-09 06:00:55 -05:00
|
|
|
WANTLIB-cgi += freetype gd jpeg m png pthread-stubs ssl upsclient xcb z
|
2011-03-09 18:32:20 -05:00
|
|
|
WANTLIB-snmp += ${COMMON} netsnmp
|
2010-10-03 18:21:49 -04:00
|
|
|
|
2011-03-09 06:00:55 -05:00
|
|
|
MASTER_SITES= ${HOMEPAGE}source/2.6/
|
2010-03-20 13:11:40 -04:00
|
|
|
|
|
|
|
MODULES= devel/gettext
|
2011-03-09 06:00:55 -05:00
|
|
|
BUILD_DEPENDS+= textproc/asciidoc \
|
|
|
|
textproc/docbook \
|
|
|
|
textproc/docbook-xsl
|
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
|
2011-03-09 18:32:20 -05:00
|
|
|
USE_GROFF= Yes
|
2004-02-09 01:48:48 -05:00
|
|
|
|
2008-02-03 13:06:41 -05:00
|
|
|
CONFIGURE_STYLE= gnu old
|
2011-03-09 06:00:55 -05:00
|
|
|
CONFIGURE_ARGS+= A2X=${LOCALBASE}/bin/a2x.py \
|
|
|
|
--sysconfdir=${SYSCONFDIR}/nut \
|
2007-05-18 08:22:45 -04:00
|
|
|
--datadir=${PREFIX}/share/ups \
|
|
|
|
--mandir=${PREFIX}/man \
|
2011-03-09 06:00:55 -05:00
|
|
|
--with-doc=html-single \
|
|
|
|
--with-ssl \
|
2007-05-18 08:22:45 -04:00
|
|
|
--with-statepath=/var/db/nut \
|
|
|
|
--with-user=${NUT_USER} \
|
2011-03-09 06:00:55 -05:00
|
|
|
--with-group=${NUT_USER}
|
2002-10-14 12:14:33 -04:00
|
|
|
|
2011-03-09 18:32:20 -05:00
|
|
|
PSEUDO_FLAVORS= no_snmp no_xml
|
2002-10-14 12:14:33 -04:00
|
|
|
FLAVOR?=
|
2008-01-30 15:55:59 -05:00
|
|
|
MULTI_PACKAGES= -main -cgi
|
2011-03-09 18:32:20 -05:00
|
|
|
|
2011-03-09 06:00:55 -05:00
|
|
|
.if ${FLAVOR:L:Mno_snmp}
|
|
|
|
CONFIGURE_ARGS+= --without-snmp
|
|
|
|
.else
|
2004-10-02 23:13:10 -04:00
|
|
|
MULTI_PACKAGES+= -snmp
|
|
|
|
.endif
|
2006-11-25 14:36:43 -05:00
|
|
|
|
2011-03-09 18:32:20 -05:00
|
|
|
.if ${FLAVOR:L:Mno_xml}
|
|
|
|
CONFIGURE_ARGS+= --without-neon
|
|
|
|
.else
|
|
|
|
MULTI_PACKAGES+= -xml
|
|
|
|
.endif
|
|
|
|
|
2010-03-20 13:11:40 -04:00
|
|
|
LIB_DEPENDS-main= ${MODGETTEXT_LIB_DEPENDS} \
|
2011-03-09 18:32:20 -05:00
|
|
|
devel/libusb
|
|
|
|
RUN_DEPENDS-main= # empty
|
2008-01-30 15:55:59 -05:00
|
|
|
|
2007-05-18 08:22:45 -04:00
|
|
|
PREFIX-cgi= ${WEB_ROOT}
|
2006-11-25 14:36:43 -05:00
|
|
|
|
2011-03-09 18:32:20 -05:00
|
|
|
LIB_DEPENDS-xml= net/neon
|
|
|
|
RUN_DEPENDS-xml= ${RUN_DEPENDS} \
|
|
|
|
sysutils/nut
|
|
|
|
|
2010-11-20 12:22:40 -05:00
|
|
|
LIB_DEPENDS-snmp= net/net-snmp
|
2011-03-09 18:32:20 -05:00
|
|
|
RUN_DEPENDS-snmp= sysutils/nut
|
2010-03-20 13:11:40 -04:00
|
|
|
|
2010-10-03 18:21:49 -04:00
|
|
|
LIB_DEPENDS-cgi= ${LIB_DEPENDS} \
|
2010-11-20 12:22:40 -05:00
|
|
|
graphics/jpeg \
|
|
|
|
graphics/gd \
|
2011-03-09 18:32:20 -05:00
|
|
|
sysutils/nut
|
2006-11-25 14:36:43 -05:00
|
|
|
|
|
|
|
.if ${MULTI_PACKAGES:M-cgi}
|
2010-11-20 12:22:40 -05:00
|
|
|
BUILD_DEPENDS+= graphics/gd>=1.8.3
|
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" \
|
2011-03-09 18:32:20 -05:00
|
|
|
--with-gd-libs="-L${X11BASE}/lib -L${PREFIX}/lib \
|
2008-01-30 15:55:59 -05:00
|
|
|
-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
|
2011-03-09 06:00:55 -05:00
|
|
|
FAKE_FLAGS= sysconfdir=${PREFIX}/share/examples/nut
|
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
|
|
|
|
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} ${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 \
|
2011-03-09 18:32:20 -05:00
|
|
|
${WRKINST}${WEB_ROOT}/conf/nut/
|
|
|
|
.endfor
|
2011-03-09 06:00:55 -05:00
|
|
|
${INSTALL_DATA_DIR} ${PREFIX}/share/doc/nut/
|
|
|
|
cd ${WRKSRC}/docs; cp -R ../[A-LN-Z]* ../MAINTAINERS \
|
|
|
|
*html cables images ${PREFIX}/share/doc/nut/
|
2001-02-06 17:24:03 -05:00
|
|
|
|
|
|
|
.include <bsd.port.mk>
|