Gentoo Archives: gentoo-commits

From: "Diego Petteno (flameeyes)" <flameeyes@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] gentoo-x86 commit in sys-power/apcupsd: ChangeLog apcupsd-3.14.10.ebuild
Date: Thu, 29 Sep 2011 13:46:08
Message-Id: 20110929134558.618F720036@flycatcher.gentoo.org
1 flameeyes 11/09/29 13:45:58
2
3 Modified: ChangeLog
4 Added: apcupsd-3.14.10.ebuild
5 Log:
6 Version bump.
7
8 (Portage version: 2.2.0_alpha59/cvs/Linux x86_64)
9
10 Revision Changes Path
11 1.75 sys-power/apcupsd/ChangeLog
12
13 file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/sys-power/apcupsd/ChangeLog?rev=1.75&view=markup
14 plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/sys-power/apcupsd/ChangeLog?rev=1.75&content-type=text/plain
15 diff : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/sys-power/apcupsd/ChangeLog?r1=1.74&r2=1.75
16
17 Index: ChangeLog
18 ===================================================================
19 RCS file: /var/cvsroot/gentoo-x86/sys-power/apcupsd/ChangeLog,v
20 retrieving revision 1.74
21 retrieving revision 1.75
22 diff -u -r1.74 -r1.75
23 --- ChangeLog 29 Aug 2011 13:38:55 -0000 1.74
24 +++ ChangeLog 29 Sep 2011 13:45:58 -0000 1.75
25 @@ -1,6 +1,12 @@
26 # ChangeLog for sys-power/apcupsd
27 # Copyright 1999-2011 Gentoo Foundation; Distributed under the GPL v2
28 -# $Header: /var/cvsroot/gentoo-x86/sys-power/apcupsd/ChangeLog,v 1.74 2011/08/29 13:38:55 flameeyes Exp $
29 +# $Header: /var/cvsroot/gentoo-x86/sys-power/apcupsd/ChangeLog,v 1.75 2011/09/29 13:45:58 flameeyes Exp $
30 +
31 +*apcupsd-3.14.10 (29 Sep 2011)
32 +
33 + 29 Sep 2011; Diego E. Pettenò <flameeyes@g.o>
34 + +apcupsd-3.14.10.ebuild:
35 + Version bump.
36
37 29 Aug 2011; Diego E. Pettenò <flameeyes@g.o> apcupsd-3.14.7.ebuild,
38 apcupsd-3.14.8-r1.ebuild, +files/apcupsd.init.2a:
39
40
41
42 1.1 sys-power/apcupsd/apcupsd-3.14.10.ebuild
43
44 file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/sys-power/apcupsd/apcupsd-3.14.10.ebuild?rev=1.1&view=markup
45 plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/sys-power/apcupsd/apcupsd-3.14.10.ebuild?rev=1.1&content-type=text/plain
46
47 Index: apcupsd-3.14.10.ebuild
48 ===================================================================
49 # Copyright 1999-2011 Gentoo Foundation
50 # Distributed under the terms of the GNU General Public License v2
51 # $Header: /var/cvsroot/gentoo-x86/sys-power/apcupsd/apcupsd-3.14.10.ebuild,v 1.1 2011/09/29 13:45:58 flameeyes Exp $
52
53 EAPI=4
54
55 inherit eutils linux-info flag-o-matic
56
57 DESCRIPTION="APC UPS daemon with integrated tcp/ip remote shutdown"
58 HOMEPAGE="http://www.apcupsd.org/"
59 SRC_URI="mirror://sourceforge/apcupsd/${P}.tar.gz"
60
61 LICENSE="GPL-2"
62 SLOT="0"
63 KEYWORDS="~amd64 ~ppc ~x86 ~x86-fbsd"
64 IUSE="snmp +usb cgi nls gnome kernel_linux"
65
66 DEPEND="
67 cgi? ( >=media-libs/gd-1.8.4 )
68 nls? ( sys-devel/gettext )
69 snmp? ( net-analyzer/net-snmp )
70 gnome? ( >=x11-libs/gtk+-2.4.0:2
71 dev-libs/glib:2
72 >=gnome-base/gconf-2.0 )"
73 RDEPEND="${DEPEND}
74 sys-apps/openrc
75 virtual/mailx"
76
77 CONFIG_CHECK="~USB_HIDDEV ~HIDRAW"
78 ERROR_USB_HIDDEV="CONFIG_USB_HIDDEV: needed to access USB-attached UPSes"
79 ERROR_HIDRAW="CONFIG_HIDRAW: needed to access USB-attached UPSes"
80
81 pkg_setup() {
82 if use kernel_linux && use usb && linux_config_exists; then
83 check_extra_config
84 fi
85 }
86
87 src_prepare() {
88 epatch "${FILESDIR}/${PN}-3.14.9-aliasing.patch"
89 }
90
91 src_configure() {
92 local myconf
93 use cgi && myconf="${myconf} --enable-cgi --with-cgi-bin=/usr/libexec/${PN}/cgi-bin"
94 if use usb; then
95 myconf="${myconf} --with-upstype=usb --with-upscable=usb --enable-usb --with-dev= "
96 else
97 myconf="${myconf} --with-upstype=apcsmart --with-upscable=smart --disable-usb"
98 fi
99
100 # We force the DISTNAME to gentoo so it will use gentoo's layout also
101 # when installed on non-linux systems.
102 econf \
103 --sbindir=/sbin \
104 --sysconfdir=/etc/apcupsd \
105 --with-pwrfail-dir=/etc/apcupsd \
106 --with-lock-dir=/var/lock \
107 --with-pid-dir=/var/run \
108 --with-log-dir=/var/log \
109 --with-nis-port=3551 \
110 --enable-net --enable-pcnet \
111 --with-distname=gentoo \
112 $(use_enable snmp net-snmp) \
113 $(use_enable gnome gapcmon) \
114 ${myconf} \
115 APCUPSD_MAIL=/bin/mail
116 }
117
118 src_compile() {
119 # Workaround for bug #280674; upstream should really just provide
120 # the text files in the distribution, but I wouldn't count on them
121 # doing that anytime soon.
122 MANPAGER=$(type -p cat) \
123 emake || die "emake failed"
124 }
125
126 src_install() {
127 emake DESTDIR="${D}" install || die "installed failed"
128 rm -f "${D}"/etc/init.d/halt
129
130 insinto /etc/apcupsd
131 newins examples/safe.apccontrol safe.apccontrol
132
133 dodoc ChangeLog* ReleaseNotes
134 doman doc/*.8 doc/*.5
135
136 dohtml -r doc/manual/*
137
138 rm "${D}"/etc/init.d/apcupsd
139 newinitd "${FILESDIR}/${PN}.init.2" "${PN}"
140 newinitd "${FILESDIR}/${PN}.powerfail.init" "${PN}".powerfail
141
142 # remove hal settings, we don't really want to have it around still.
143 rm -r "${D}"/usr/share/hal
144
145 # replace it with our udev rules if we're in Linux
146 if use kernel_linux; then
147 insinto /lib/udev/rules.d
148 newins "${FILESDIR}"/apcupsd-udev.rules 60-${PN}.rules
149 fi
150
151 # Without this it'll crash at startup. When merging in ROOT= this
152 # won't be created by default, so we want to make sure we got it!
153 keepdir /var/lock
154 fowners root:uucp /var/lock
155 fperms 0775 /var/lock
156 }
157
158 pkg_postinst() {
159 if use cgi; then
160 elog "The cgi-bin directory for ${PN} is /usr/libexec/${PN}/cgi-bin."
161 elog "Set up your ScriptAlias or symbolic links accordingly."
162 fi
163
164 elog ""
165 elog "Since version 3.14.0 you can use multiple apcupsd instances to"
166 elog "control more than one UPS in a single box."
167 elog "To do this, create a link between /etc/init.d/apcupsd to a new"
168 elog "/etc/init.d/apcupsd.something, and it will then load the"
169 elog "configuration file at /etc/apcupsd/something.conf."
170 elog ""
171
172 elog 'If you want apcupsd to power off your UPS when it'
173 elog 'shuts down your system in a power failure, you must'
174 elog 'add apcupsd.powerfail to your shutdown runlevel:'
175 elog ''
176 elog ' \e[01m rc-update add apcupsd.powerfail shutdown \e[0m'
177 elog ''
178
179 if use kernel_linux; then
180 elog "Starting from version 3.14.9-r1, ${PN} installs udev rules"
181 elog "for persistent device naming. If you have multiple UPS"
182 elog "connected to the machine, you can point them to the devices"
183 elog "in /dev/apcups/by-id directory."
184 fi
185 }