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