2014-07-06 13:14:34 +00:00
# Created by: Lars Köller <Lars.Koeller@Uni-Bielefeld.DE>
2001-12-02 11:24:53 +00:00
# $FreeBSD$
PORTNAME = apcupsd
2014-07-06 13:14:34 +00:00
PORTVERSION = 3.14.12
2014-07-06 17:56:43 +00:00
PORTREVISION = 1
2001-12-02 11:24:53 +00:00
CATEGORIES = sysutils
2014-07-06 17:56:43 +00:00
MASTER_SITES = SF/${ PORTNAME } /${ PORTNAME } %20-%20Stable/${ PORTVERSION }
2001-12-02 11:24:53 +00:00
2006-08-04 14:17:31 +00:00
MAINTAINER = itetcu@FreeBSD.org
2008-03-31 17:21:57 +00:00
COMMENT = Set of programs for controlling APC UPS
2001-12-02 11:24:53 +00:00
2006-04-22 13:51:37 +00:00
USE_RC_SUBR = apcupsd
2007-10-21 10:39:39 +00:00
SUB_FILES = pkg-message
2001-12-02 11:24:53 +00:00
2007-07-23 09:36:51 +00:00
GNU_CONFIGURE = yes
2014-05-29 11:20:14 +00:00
USES = gmake
2014-07-06 13:14:34 +00:00
OPTIONS_SUB = yes
2007-07-23 09:36:51 +00:00
CONFIGURE_ARGS = --sbindir= ${ PREFIX } /sbin \
2004-01-18 16:29:11 +00:00
--with-nologin= /var/run \
2005-04-15 17:24:04 +00:00
--disable-install-distdir \
2007-10-21 10:39:39 +00:00
--sysconfdir= ${ ETCDIR } \
2004-03-09 20:01:43 +00:00
--with-serial-dev= /dev/usv
2004-02-03 20:18:25 +00:00
2014-07-06 13:14:34 +00:00
CONFIGURE_ENV += LD = " ${ CXX } " LIBS = "-lstdc++"
2014-06-11 14:49:59 +00:00
CPPFLAGS += -I${ LOCALBASE } /include
LIBS += -L${ LOCALBASE } /lib
2006-04-22 13:51:37 +00:00
2013-04-28 20:01:07 +00:00
OPTIONS_DEFINE = APCSMART_DRV APCDUMB_DRV CLIENT_ONLY CGI PCNET_DRV USB SNMP_DRV \
2014-07-06 13:14:34 +00:00
SNMP_DRV_OLD TCP_WRAPPERS TEST_DRV GAPCMON DOCS MODBUS
OPTIONS_DEFAULT = APCSMART_DRV APCDUMB_DRV PCNET_DRV USB TCP_WRAPPERS MODBUS
2013-04-28 20:01:07 +00:00
APCSMART_DRV_DESC = Compile APC SmartUPS serial driver
APCDUMB_DRV_DESC = Compile dumb UPS driver
CLIENT_ONLY_DESC = Only NIS client ( no network server or drivers)
CGI_DESC = Compile with CGI programms to show status
PCNET_DRV_DESC = Compile PowerChute Network Shutdown driver
USB_DESC = Compile with USB Support driver
SNMP_DRV_DESC = Compile with SNMP driver
SNMP_DRV_OLD_DESC = Compile with old SNMP driver
TCP_WRAPPERS_DESC = Compile with TCP_WRAPPERS support
TEST_DRV_DESC = Compile TEST driver
GAPCMON_DESC = Build GTK GUI front-end
2014-07-06 13:14:34 +00:00
MODBUS_DESC = Compile with MODBUS driver
2004-02-09 19:23:34 +00:00
2014-07-06 17:56:43 +00:00
#PORTDOCS= ${PORTNAME}.pdf
2004-02-09 19:23:34 +00:00
2014-07-06 13:14:34 +00:00
APCSMART_DRV_CONFIGURE_ENABLE = apcsmart
APCDUMB_DRV_CONFIGURE_ENABLE = dumb
CLIENT_ONLY_CONFIGURE_ON = --enable-net \
--disable-apcsmart --disable-dumb --disable-usb \
--disable-snmp --disable-test --disable-pcnet
CGI_CONFIGURE_ENABLE = cgi
CGI_CONFIGURE_ON = --with-cgi-bin= ${ ETCDIR } /cgi
CGI_LIB_DEPENDS = libgd.so:${ PORTSDIR } /graphics/gd
GAPCMON_CONFIGURE_ENABLE = gapcmon
GAPCMON_USE = GNOME = gconf2
GPCMON_CONFLICTS = gapcmon-[ 0-9] *
PCNET_DRV_CONFIGURE_ENABLE = pcnet
USB_CONFIGURE_ENABLE = usb
SNMP_DRV_CONFIGURE_ENABLE = snmp
MODBUS_CONFIGURE_ENABLE = modbus
SNMP_DRV_OLD_CONFIGURE_ENABLE = net-snmp
SNMP_DRV_OLD_LIB_DEPENDS = libnetsnmp.so:${ PORTSDIR } /net-mgmt/net-snmp
TCP_WRAPPERS_CONFIGURE_WITH = libwrap = yes
TEST_DRV_CONFIGURE_ENABLE = test
2008-03-31 17:21:57 +00:00
#CONFIGURE_ARGS+= --with-libwrap=yes
#CONFIGURE_ENV+= LIBS="-lcurses -lmenu"
#PLIST_SUB+= POWERFL=""
2014-07-06 13:14:34 +00:00
. i n c l u d e < b s d . p o r t . o p t i o n s . m k >
2008-03-31 17:21:57 +00:00
pre-configure :
2013-04-28 20:01:07 +00:00
.if ${PORT_OPTIONS : MCLIENT_ONLY } && ( ${PORT_OPTIONS :MAPCSMART_DRV } | | \
${ PORT_OPTIONS : MAPCDUMB_DRV } || ${ PORT_OPTIONS : MPCNET_DRV } || \
${ PORT_OPTIONS : MPOWERFLUTE } || ${ PORT_OPTIONS : MUSB } || \
${ PORT_OPTIONS : MSNMP_DRV } || ${ PORT_OPTIONS : MTEST_DRV } )
2008-03-31 17:21:57 +00:00
@${ ECHO_CMD } "It doesn't make sense to build drivers if all you want is"
@${ ECHO_CMD } "the client; please do make config and select either"
@${ ECHO_CMD } "CLIENT_ONLY or the *_DRV you need"
@${ FALSE }
. e n d i f
2004-01-04 19:18:20 +00:00
2001-12-02 11:24:53 +00:00
post-install :
2007-10-21 10:39:39 +00:00
@${ ECHO_CMD } " @unexec if [ -d %D/ ${ ETCDIR_REL } ]; then ${ ECHO_CMD } \"If you are permanently removing this port, you should do a ``rm -rf ${ ETCDIR } `` to remove config files left.\" | ${ FMT } ; fi " >> ${ TMPPLIST }
2006-04-22 13:51:37 +00:00
# Install sample startup script
2004-11-02 14:34:21 +00:00
for na in apcupsd.conf apcupsd.css hosts.conf multimon.conf; do \
2014-07-06 13:14:34 +00:00
if [ -f ${ STAGEDIR } ${ ETCDIR } /$$ na ] ; then \
${ MV } ${ STAGEDIR } ${ ETCDIR } /$$ na ${ STAGEDIR } ${ ETCDIR } /$$ na.sample; \
fi \
2004-10-28 19:21:50 +00:00
done
2001-12-02 11:24:53 +00:00
2013-04-28 20:01:07 +00:00
. i n c l u d e < b s d . p o r t . m k >