summaryrefslogtreecommitdiff
blob: 5767874c3c9f49e740035db10210c7ebb4b52f55 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
# Copyright 1999-2017 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Id$

EAPI=6

DESCRIPTION="RPC/PDU control and monitoring service for data center or compute cluster power management"
HOMEPAGE="https://github.com/chaos/powerman"
SRC_URI="https://github.com/chaos/${PN}/archive/${P}.tar.gz"

LICENSE="GPL-2+"
SLOT="0"
KEYWORDS="~amd64 ~x86"
IUSE="+httppower -snmppower -h8power +genders"

DEPEND="sys-devel/bison
	httppower? ( net-misc/curl )
	snmppower? ( net-analyzer/net-snmp )
	!app-accessibility/speech-tools"
RDEPEND=">=sys-libs/freeipmi-0.2.3"

src_configure() {
	# Powerman stores the pidfile under $localstatedir/run.
	# It's set to /var/lib in the release, but in gentoo pidfiles live under /var/run.
	econf \
		--localstatedir=/var \
		$(use_with httppower) \
		$(use_with snmppower) \
		$(use_with h8power) \
		$(use_with genders)
}

src_install() {
	emake DESTDIR="${D}" -j1 install
	rm -rf "${D}"/{etc/init.d/${PN},var/run}
	doinitd "${FILESDIR}"/${PN}
	dodoc AUTHORS ChangeLog DISCLAIMER NEWS TODO
}