Gentoo Archives: gentoo-commits

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