blob: aea4820cdf777cff8f9ef78cddd250785b2f30d5 (
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
|
# Copyright 1999-2005 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Header: /var/cvsroot/gentoo-x86/net-misc/powerd/powerd-2.0.2.ebuild,v 1.7 2005/07/30 18:19:50 swegener Exp $
IUSE=""
DESCRIPTION="Generic UPS daemon"
HOMEPAGE="http://power.sourceforge.net/"
SRC_URI="mirror://sourceforge/power/${P}.tar.gz"
KEYWORDS="x86 ~amd64"
LICENSE="GPL-2"
SLOT="0"
src_compile() {
./configure --prefix=${D}
emake || die
}
src_install() {
dosbin powerd
dobin detectups
dodoc powerd.conf.monitor powerd.conf.peer README FAQ INSTALL SUPPORTED TODO Changelog
doman powerd.8 detectups.8
newinitd ${FILESDIR}/powerd-init powerd
}
pkg_postinst() {
einfo "Add the following lines to your /etc/inittab, then do kill -SIGHUP 1"
einfo "pf:12345:powerfail:/sbin/shutdown -h +10 Power failure."
einfo "po:12345:powerokwait:/sbin/shutdown -c Power restored"
einfo "Change the +10 in whatever shutdown timeout you want."
}
|