# -*- coding: utf-8; mode: tcl; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- vim:fenc=utf-8:ft=tcl:et:sw=4:ts=4:sts=4 # $Id: Portfile 101157 2013-01-05 15:58:57Z ryandesign@macports.org $ PortSystem 1.0 name nut version 2.6.5 categories sysutils platforms darwin maintainers nomaintainer # The files in scripts/perl and scripts/python are under other licenses # but we don't use them in this port. license GPL-2+ description Network based UPS monitoring tool long_description Network UPS Tools is a collection of programs \ which provide a common interface for monitoring \ and administering UPS hardware. homepage http://www.networkupstools.org/ master_sites ${homepage}source/[join [lrange [split ${version} .] 0 1] .]/ checksums rmd160 d6e6acd4696e3c3f8c0ecd998f8676a8625decb9 \ sha256 618df71cf1ca6e3700d1d3c282773a2dec85f9f20324c0d3234c824e97feb93f depends_build port:pkgconfig depends_lib port:libtool \ port:libusb-compat \ port:neon \ port:tcp_wrappers set userName _nut set groupName _nut set stateDir ${prefix}/var/db/ups destroot.keepdirs ${destroot}${stateDir} configure.args --with-serial=no \ --with-usb=auto \ --with-snmp=no \ --with-hal=auto \ --with-cgi=no \ --with-neonxml=no \ --with-ssl=yes \ --with-ipv6=no \ --with-statepath=${stateDir} \ --with-pidpath=${prefix}/var/run \ --with-hotplug-dir=${prefix}/etc/nut/hotplug \ --with-udev-dir=${prefix}/etc/nut/udev \ --with-user=${userName} \ --with-group=${groupName} pre-destroot { addgroup ${groupName} set gid [existsgroup ${groupName}] adduser ${userName} gid=${gid} xinstall -d -m 0770 -g ${groupName} -o ${userName} ${destroot}${stateDir} } ## variant snmp { ## configure.args-append --with-snmp=yes ## configure.args-delete --with-snmp=no ## depends_lib-append port:net-snmp ## } livecheck.type regex livecheck.regex {: ([0-9.]+) released}