2013-06-20 06:54:36 +00:00
|
|
|
# $OpenBSD: Makefile,v 1.72 2013/06/20 06:54:37 ajacoutot Exp $
|
2001-05-06 03:58:56 +00:00
|
|
|
|
2007-09-15 21:14:00 +00:00
|
|
|
COMMENT-main= UPS monitoring program supporting many brands
|
|
|
|
COMMENT-cgi= CGIs for monitoring Nut-based UPSs
|
2011-03-09 23:32:20 +00:00
|
|
|
COMMENT-snmp= driver for monitoring UPS via SNMP
|
|
|
|
COMMENT-xml= driver for monitoring UPS via XML/HTTP
|
2001-02-06 22:24:03 +00:00
|
|
|
|
2012-08-09 12:05:16 +00:00
|
|
|
DISTNAME= nut-2.6.5
|
2013-06-20 06:54:36 +00:00
|
|
|
REVISION-main= 2
|
|
|
|
REVISION-cgi= 1
|
|
|
|
REVISION-xml= 1
|
2010-10-03 22:21:49 +00:00
|
|
|
|
|
|
|
PKGNAME-main= ${DISTNAME}
|
2010-03-31 22:11:11 +00:00
|
|
|
PKGNAME-cgi= ${DISTNAME:S/-/-cgi-/}
|
2010-10-03 22:21:49 +00:00
|
|
|
PKGNAME-snmp= ${DISTNAME:S/-/-snmp-/}
|
2011-03-09 23:32:20 +00:00
|
|
|
PKGNAME-xml= ${DISTNAME:S/-/-xml-/}
|
2010-10-03 22:21:49 +00:00
|
|
|
|
2012-06-08 21:07:02 +00:00
|
|
|
SHARED_LIBS += upsclient 2.0 # 2.0
|
|
|
|
SHARED_LIBS += nutscan 1.0 # 1.0
|
2011-09-19 15:59:57 +00:00
|
|
|
|
2002-10-14 16:14:33 +00:00
|
|
|
CATEGORIES= sysutils
|
2004-02-09 06:48:48 +00:00
|
|
|
HOMEPAGE= http://www.networkupstools.org/
|
2007-05-18 12:22:45 +00:00
|
|
|
|
2010-10-03 22:21:49 +00: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 19:38:30 +00:00
|
|
|
|
2009-04-03 15:40:12 +00:00
|
|
|
# GPLv2+, some scripts (not packaged) are GPLv3+
|
2001-02-06 22:24:03 +00:00
|
|
|
PERMIT_PACKAGE_CDROM= Yes
|
2010-03-20 17:11:40 +00:00
|
|
|
|
2011-09-19 15:59:57 +00:00
|
|
|
COMMON += c crypto pthread
|
2012-01-11 16:01:33 +00:00
|
|
|
WANTLIB-main += ${COMMON} ltdl m ssl usb usb-1.0 wrap
|
2012-05-14 06:26:52 +00:00
|
|
|
WANTLIB-xml += ${COMMON} ${MODGETTEXT_WANTLIB} asn1 expat gssapi krb5 neon ssl z proxy
|
2013-06-20 06:54:36 +00:00
|
|
|
WANTLIB-xml += com_err heimbase roken wind
|
2011-11-14 15:57:21 +00:00
|
|
|
WANTLIB-cgi += ${COMMON} ${MODGETTEXT_WANTLIB} X11 expat fontconfig
|
2011-09-19 15:59:57 +00:00
|
|
|
WANTLIB-cgi += freetype gd jpeg m png ssl upsclient xcb z
|
|
|
|
WANTLIB-snmp += ${COMMON} m netsnmp
|
2010-10-03 22:21:49 +00:00
|
|
|
|
2011-03-09 11:00:55 +00:00
|
|
|
MASTER_SITES= ${HOMEPAGE}source/2.6/
|
2010-03-20 17:11:40 +00:00
|
|
|
|
2011-11-14 15:57:21 +00:00
|
|
|
MODULES= devel/gettext \
|
2011-11-14 08:58:07 +00:00
|
|
|
lang/python
|
2011-09-19 15:59:57 +00:00
|
|
|
MODPY_RUNDEP= No
|
2013-03-04 11:34:51 +00:00
|
|
|
BUILD_DEPENDS+= textproc/asciidoc>=8.6.8 \
|
2011-03-09 11:00:55 +00:00
|
|
|
textproc/docbook-xsl
|
2001-02-06 22:24:03 +00:00
|
|
|
|
2002-10-14 16:14:33 +00:00
|
|
|
WEB_ROOT= /var/www
|
2004-02-09 06:48:48 +00:00
|
|
|
NUT_USER= _ups
|
2004-02-21 06:16:58 +00:00
|
|
|
NUT_ID= 529
|
2012-01-12 11:39:36 +00:00
|
|
|
SUBST_VARS= BASESYSCONFDIR NUT_USER NUT_ID WEB_ROOT
|
2011-03-09 23:32:20 +00:00
|
|
|
USE_GROFF= Yes
|
2004-02-09 06:48:48 +00:00
|
|
|
|
2011-11-28 10:52:03 +00:00
|
|
|
CONFIGURE_STYLE= gnu
|
|
|
|
SYSCONFDIR= ${BASESYSCONFDIR}/nut
|
2012-05-14 06:26:52 +00:00
|
|
|
LDFLAGS+= -L${LOCALBASE}/lib -pthread
|
2012-01-11 16:01:33 +00:00
|
|
|
CONFIGURE_ARGS+= --datadir=${PREFIX}/share/ups \
|
2011-03-09 11:00:55 +00:00
|
|
|
--with-doc=html-single \
|
2012-01-11 16:01:33 +00:00
|
|
|
--with-hal-libs="" \
|
2011-03-09 11:00:55 +00:00
|
|
|
--with-ssl \
|
2007-05-18 12:22:45 +00:00
|
|
|
--with-statepath=/var/db/nut \
|
|
|
|
--with-user=${NUT_USER} \
|
2012-01-11 16:01:33 +00:00
|
|
|
--with-group=${NUT_USER} \
|
|
|
|
CPPFLAGS="-I${LOCALBASE}/include" \
|
|
|
|
LDFLAGS="${LDFLAGS}"
|
2002-10-14 16:14:33 +00:00
|
|
|
|
2011-03-09 23:32:20 +00:00
|
|
|
PSEUDO_FLAVORS= no_snmp no_xml
|
2002-10-14 16:14:33 +00:00
|
|
|
FLAVOR?=
|
2008-01-30 20:55:59 +00:00
|
|
|
MULTI_PACKAGES= -main -cgi
|
2011-03-09 23:32:20 +00:00
|
|
|
|
2013-02-09 14:49:50 +00:00
|
|
|
.if ${FLAVOR:Mno_snmp}
|
2011-03-09 11:00:55 +00:00
|
|
|
CONFIGURE_ARGS+= --without-snmp
|
|
|
|
.else
|
2004-10-03 03:13:10 +00:00
|
|
|
MULTI_PACKAGES+= -snmp
|
|
|
|
.endif
|
2006-11-25 19:36:43 +00:00
|
|
|
|
2013-02-09 14:49:50 +00:00
|
|
|
.if ${FLAVOR:Mno_xml}
|
2011-03-09 23:32:20 +00:00
|
|
|
CONFIGURE_ARGS+= --without-neon
|
|
|
|
.else
|
|
|
|
MULTI_PACKAGES+= -xml
|
|
|
|
.endif
|
|
|
|
|
2010-03-20 17:11:40 +00:00
|
|
|
LIB_DEPENDS-main= ${MODGETTEXT_LIB_DEPENDS} \
|
2012-01-11 16:01:33 +00:00
|
|
|
devel/libtool,-ltdl \
|
2011-11-14 08:58:07 +00:00
|
|
|
devel/libusb-compat
|
2011-03-09 23:32:20 +00:00
|
|
|
RUN_DEPENDS-main= # empty
|
2008-01-30 20:55:59 +00:00
|
|
|
|
2007-05-18 12:22:45 +00:00
|
|
|
PREFIX-cgi= ${WEB_ROOT}
|
2006-11-25 19:36:43 +00:00
|
|
|
|
2011-03-09 23:32:20 +00:00
|
|
|
LIB_DEPENDS-xml= net/neon
|
|
|
|
RUN_DEPENDS-xml= ${RUN_DEPENDS} \
|
|
|
|
sysutils/nut
|
|
|
|
|
2010-11-20 17:22:40 +00:00
|
|
|
LIB_DEPENDS-snmp= net/net-snmp
|
2011-03-09 23:32:20 +00:00
|
|
|
RUN_DEPENDS-snmp= sysutils/nut
|
2010-03-20 17:11:40 +00:00
|
|
|
|
2010-10-03 22:21:49 +00:00
|
|
|
LIB_DEPENDS-cgi= ${LIB_DEPENDS} \
|
2010-11-20 17:22:40 +00:00
|
|
|
graphics/jpeg \
|
|
|
|
graphics/gd \
|
2011-03-09 23:32:20 +00:00
|
|
|
sysutils/nut
|
2006-11-25 19:36:43 +00:00
|
|
|
|
|
|
|
.if ${MULTI_PACKAGES:M-cgi}
|
2010-11-20 17:22:40 +00:00
|
|
|
BUILD_DEPENDS+= graphics/gd>=1.8.3
|
2001-02-06 22:24:03 +00:00
|
|
|
|
2007-05-18 12:22:45 +00:00
|
|
|
CONFIGURE_ARGS+= --with-cgi \
|
|
|
|
--with-cgipath="${WEB_ROOT}/cgi-bin/nut" \
|
2011-03-09 23:32:20 +00:00
|
|
|
--with-gd-libs="-L${X11BASE}/lib -L${PREFIX}/lib \
|
2008-01-30 20:55:59 +00:00
|
|
|
-lgd -lpng -lz -ljpeg -lm -lfreetype -lX11" \
|
2007-05-18 12:22:45 +00:00
|
|
|
--with-gd-includes="-I${PREFIX}/include"
|
2001-02-06 22:24:03 +00:00
|
|
|
.endif
|
|
|
|
|
2008-09-27 17:30:08 +00:00
|
|
|
USE_GMAKE= Yes
|
2012-11-09 20:50:17 +00:00
|
|
|
USE_LIBTOOL= gnu# -all-static
|
2011-03-09 11:00:55 +00: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 19:38:30 +00:00
|
|
|
|
2013-03-11 11:35:43 +00:00
|
|
|
NO_TEST= Yes
|
2002-10-28 19:53:43 +00:00
|
|
|
|
2010-03-03 20:39:15 +00:00
|
|
|
pre-configure:
|
|
|
|
${SUBST_CMD} ${WRKSRC}/conf/upssched.conf.sample.in
|
2012-01-31 14:20:18 +00:00
|
|
|
-ln -s ${MODPY_BIN} ${WRKDIR}/bin/python
|
2010-03-03 20:39:15 +00:00
|
|
|
|
2001-02-06 22:24:03 +00:00
|
|
|
post-install:
|
2004-09-27 03:10:24 +00:00
|
|
|
${INSTALL_DATA_DIR} ${WRKINST}${WEB_ROOT}/conf/nut/
|
2004-02-09 06:48:48 +00:00
|
|
|
.for file in hosts.conf upsset.conf upsstats.html upsstats-single.html
|
2008-01-30 20:55:59 +00:00
|
|
|
${INSTALL_DATA} ${WRKBUILD}/conf/${file}.sample \
|
2011-03-09 23:32:20 +00:00
|
|
|
${WRKINST}${WEB_ROOT}/conf/nut/
|
|
|
|
.endfor
|
2011-03-09 11:00:55 +00:00
|
|
|
${INSTALL_DATA_DIR} ${PREFIX}/share/doc/nut/
|
|
|
|
cd ${WRKSRC}/docs; cp -R ../[A-LN-Z]* ../MAINTAINERS \
|
|
|
|
*html cables images ${PREFIX}/share/doc/nut/
|
2011-11-14 08:58:07 +00:00
|
|
|
${INSTALL_SCRIPT} ${WRKSRC}/scripts/avahi/nut.service \
|
|
|
|
${PREFIX}/share/examples/nut
|
2001-02-06 22:24:03 +00:00
|
|
|
|
|
|
|
.include <bsd.port.mk>
|