Gentoo Archives: gentoo-commits

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