1 |
commit: bbe4e2bfb714636cb9d721042f423845a341b1a7 |
2 |
Author: Kristian Fiskerstrand <k_f <AT> gentoo <DOT> org> |
3 |
AuthorDate: Wed Sep 28 21:09:27 2016 +0000 |
4 |
Commit: Kristian Fiskerstrand <k_f <AT> gentoo <DOT> org> |
5 |
CommitDate: Wed Sep 28 21:11:07 2016 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=bbe4e2bf |
7 |
|
8 |
sys-power/apcupsd: Version bump 3.14.14 |
9 |
|
10 |
Package-Manager: portage-2.3.1 |
11 |
|
12 |
sys-power/apcupsd/Manifest | 1 + |
13 |
sys-power/apcupsd/apcupsd-3.14.14.ebuild | 137 +++++++++++++++++++++++++++++++ |
14 |
2 files changed, 138 insertions(+) |
15 |
|
16 |
diff --git a/sys-power/apcupsd/Manifest b/sys-power/apcupsd/Manifest |
17 |
index 9e4e80d..2173d81 100644 |
18 |
--- a/sys-power/apcupsd/Manifest |
19 |
+++ b/sys-power/apcupsd/Manifest |
20 |
@@ -1,3 +1,4 @@ |
21 |
DIST apcupsd-3.14.12.tar.gz 2014699 SHA256 1b4f703cb19cfdf44daf173dc8394cafd30fee0b30a0c75a7d19db622454a440 SHA512 2ed409ce4c7c7af667cecf0c73c47315d7516c696383c811945ead720afc146fe2ceda0efef722c3208a1b41a7d4661c9544bc4fe37a36ca4779a5dc1621f3d4 WHIRLPOOL 13a2491e4ad5446ba91a075f7408e48e94a35885288c9ee6108891d89412be5c81f69f4ab5064f86b8bece8c0de44357e4c378d05aad5d9d27bd85f0d95a83d5 |
22 |
DIST apcupsd-3.14.13.tar.gz 1935043 SHA256 57ecbde01d0448bf8c4dbfe0ad016724ae66ab98adf2de955bf2be553c5d03f9 SHA512 74f7763de268626e24f9dd99090b01d5bff35c2fde769039104105ec27941673d1613c41fcac11e3d97d2fe5c364bcc0459847fcba5d2f7f1aac85795d6d8570 WHIRLPOOL 4b6fb18848aa597bae1066a7f195747f9edfdee75a27e43e3d14e3153d4b434829c5863b7e92c0704ea652583b8c5885fd01fe7280abe93bf1c6cfc370434f73 |
23 |
+DIST apcupsd-3.14.14.tar.gz 1843409 SHA256 db7748559b6b4c3784f9856561ef6ac6199ef7bd019b3edcd7e0a647bf8f9867 SHA512 c953bbf3e08f809748a7978a3952604176390d1cd276f187fe096d9bc3c8993b52127e8350c0363387da41318e24b4d1e00ea58df71f3bb8f50c9a5a64cd2d7f WHIRLPOOL 9b50390558b3a6192a631ff3dce398d947fb19123969604d2a89ff69a2373beff6a62c314ce351caeb9d9b736fcb8d622a75899166a3710c4c557c5a841c5adc |
24 |
DIST apcupsd-3.14.8.tar.gz 1317601 SHA256 8e7f2574d3abaf6637da3e790860c3f9ba64fab1ec7e50bb080de4439441c5a7 SHA512 07e6a15538bf1824b5063a1a93f33231639cf962e658c0dada1b244f2554af81824825d807ea81fd0388e25ed8fac0957621bfded96e3faeb7b594548fc4d418 WHIRLPOOL e5a580afc4955a373f020cb6e4ccbf07f9f020d4c15eaae59b416499c25a00b9d4bbc6af012bd2529024e8a3668a1d7c47f19f1bcb99f5ba60dc0108fa13c4f2 |
25 |
|
26 |
diff --git a/sys-power/apcupsd/apcupsd-3.14.14.ebuild b/sys-power/apcupsd/apcupsd-3.14.14.ebuild |
27 |
new file mode 100644 |
28 |
index 00000000..22b9887 |
29 |
--- /dev/null |
30 |
+++ b/sys-power/apcupsd/apcupsd-3.14.14.ebuild |
31 |
@@ -0,0 +1,137 @@ |
32 |
+# Copyright 1999-2016 Gentoo Foundation |
33 |
+# Distributed under the terms of the GNU General Public License v2 |
34 |
+# $Id$ |
35 |
+ |
36 |
+EAPI=5 |
37 |
+ |
38 |
+inherit eutils linux-info flag-o-matic systemd udev |
39 |
+ |
40 |
+DESCRIPTION="APC UPS daemon with integrated tcp/ip remote shutdown" |
41 |
+HOMEPAGE="http://www.apcupsd.org/" |
42 |
+SRC_URI="mirror://sourceforge/apcupsd/${P}.tar.gz" |
43 |
+ |
44 |
+LICENSE="GPL-2" |
45 |
+SLOT="0" |
46 |
+KEYWORDS="~amd64 ~arm ~ppc ~x86 ~x86-fbsd" |
47 |
+IUSE="snmp +usb cgi nls gnome kernel_linux" |
48 |
+ |
49 |
+DEPEND=" |
50 |
+ || ( >=sys-apps/util-linux-2.23[tty-helpers(-)] |
51 |
+ sys-freebsd/freebsd-ubin |
52 |
+ ) |
53 |
+ cgi? ( >=media-libs/gd-1.8.4 ) |
54 |
+ nls? ( sys-devel/gettext ) |
55 |
+ snmp? ( >=net-analyzer/net-snmp-5.7.2 ) |
56 |
+ gnome? ( >=x11-libs/gtk+-2.4.0:2 |
57 |
+ dev-libs/glib:2 |
58 |
+ >=gnome-base/gconf-2.0 )" |
59 |
+RDEPEND="${DEPEND} |
60 |
+ virtual/mailx" |
61 |
+ |
62 |
+CONFIG_CHECK="~USB_HIDDEV ~HIDRAW" |
63 |
+ERROR_USB_HIDDEV="CONFIG_USB_HIDDEV: needed to access USB-attached UPSes" |
64 |
+ERROR_HIDRAW="CONFIG_HIDRAW: needed to access USB-attached UPSes" |
65 |
+ |
66 |
+pkg_setup() { |
67 |
+ if use kernel_linux && use usb && linux_config_exists; then |
68 |
+ check_extra_config |
69 |
+ fi |
70 |
+} |
71 |
+ |
72 |
+src_prepare() { |
73 |
+ epatch "${FILESDIR}/${PN}-3.14.9-aliasing.patch" |
74 |
+} |
75 |
+ |
76 |
+src_configure() { |
77 |
+ local myconf |
78 |
+ use cgi && myconf="${myconf} --enable-cgi --with-cgi-bin=/usr/libexec/${PN}/cgi-bin" |
79 |
+ if use usb; then |
80 |
+ myconf="${myconf} --with-upstype=usb --with-upscable=usb --enable-usb --with-dev= " |
81 |
+ else |
82 |
+ myconf="${myconf} --with-upstype=apcsmart --with-upscable=smart --disable-usb" |
83 |
+ fi |
84 |
+ |
85 |
+ # We force the DISTNAME to gentoo so it will use gentoo's layout also |
86 |
+ # when installed on non-linux systems. |
87 |
+ econf \ |
88 |
+ --sbindir=/sbin \ |
89 |
+ --sysconfdir=/etc/apcupsd \ |
90 |
+ --with-pwrfail-dir=/etc/apcupsd \ |
91 |
+ --with-lock-dir=/run/apcupsd \ |
92 |
+ --with-pid-dir=/run/apcupsd \ |
93 |
+ --with-log-dir=/var/log \ |
94 |
+ --with-nis-port=3551 \ |
95 |
+ --enable-net --enable-pcnet \ |
96 |
+ --with-distname=gentoo \ |
97 |
+ $(use_enable snmp) \ |
98 |
+ $(use_enable gnome gapcmon) \ |
99 |
+ ${myconf} \ |
100 |
+ APCUPSD_MAIL=/bin/mail |
101 |
+} |
102 |
+ |
103 |
+src_compile() { |
104 |
+ # Workaround for bug #280674; upstream should really just provide |
105 |
+ # the text files in the distribution, but I wouldn't count on them |
106 |
+ # doing that anytime soon. |
107 |
+ MANPAGER=$(type -p cat) \ |
108 |
+ emake || die "emake failed" |
109 |
+} |
110 |
+ |
111 |
+src_install() { |
112 |
+ emake DESTDIR="${D}" install |
113 |
+ rm -f "${D}"/etc/init.d/halt |
114 |
+ |
115 |
+ insinto /etc/apcupsd |
116 |
+ newins examples/safe.apccontrol safe.apccontrol |
117 |
+ doins "${FILESDIR}"/apcupsd.conf |
118 |
+ |
119 |
+ dodoc ChangeLog* ReleaseNotes |
120 |
+ doman doc/*.8 doc/*.5 |
121 |
+ |
122 |
+ dohtml -r doc/manual/* |
123 |
+ |
124 |
+ rm "${D}"/etc/init.d/apcupsd |
125 |
+ newinitd "${FILESDIR}/${PN}.init.4" "${PN}" |
126 |
+ newinitd "${FILESDIR}/${PN}.powerfail.init" "${PN}".powerfail |
127 |
+ |
128 |
+ systemd_dounit "${FILESDIR}"/${PN}.service |
129 |
+ systemd_dotmpfilesd "${FILESDIR}"/${PN}-tmpfiles.conf |
130 |
+ |
131 |
+ # remove hal settings, we don't really want to have it around still. |
132 |
+ rm -r "${D}"/usr/share/hal |
133 |
+ |
134 |
+ # replace it with our udev rules if we're in Linux |
135 |
+ if use kernel_linux; then |
136 |
+ udev_newrules "${FILESDIR}"/apcupsd-udev.rules 60-${PN}.rules |
137 |
+ fi |
138 |
+ |
139 |
+} |
140 |
+ |
141 |
+pkg_postinst() { |
142 |
+ if use cgi; then |
143 |
+ elog "The cgi-bin directory for ${PN} is /usr/libexec/${PN}/cgi-bin." |
144 |
+ elog "Set up your ScriptAlias or symbolic links accordingly." |
145 |
+ fi |
146 |
+ |
147 |
+ elog "" |
148 |
+ elog "Since version 3.14.0 you can use multiple apcupsd instances to" |
149 |
+ elog "control more than one UPS in a single box with openRC." |
150 |
+ elog "To do this, create a link between /etc/init.d/apcupsd to a new" |
151 |
+ elog "/etc/init.d/apcupsd.something, and it will then load the" |
152 |
+ elog "configuration file at /etc/apcupsd/something.conf." |
153 |
+ elog "" |
154 |
+ |
155 |
+ elog 'If you want apcupsd to power off your UPS when it' |
156 |
+ elog 'shuts down your system in a power failure, you must' |
157 |
+ elog 'add apcupsd.powerfail to your shutdown runlevel:' |
158 |
+ elog '' |
159 |
+ elog ' \e[01m rc-update add apcupsd.powerfail shutdown \e[0m' |
160 |
+ elog '' |
161 |
+ |
162 |
+ if use kernel_linux; then |
163 |
+ elog "Starting from version 3.14.9-r1, ${PN} installs udev rules" |
164 |
+ elog "for persistent device naming. If you have multiple UPS" |
165 |
+ elog "connected to the machine, you can point them to the devices" |
166 |
+ elog "in /dev/apcups/by-id directory." |
167 |
+ fi |
168 |
+} |