summaryrefslogtreecommitdiff
path: root/sys-power/apcupsd
diff options
context:
space:
mode:
authorV3n3RiX <venerix@redcorelinux.org>2021-05-22 07:31:18 +0100
committerV3n3RiX <venerix@redcorelinux.org>2021-05-22 07:31:18 +0100
commit908778078736bd36f7a60a2d576d415cb8e000fa (patch)
treec6a4796c48b608c14dc7e9674cdbd38f905e3c15 /sys-power/apcupsd
parent185fa19bbf68a4d4dca534d2b46729207a177f16 (diff)
gentoo resync : 22.05.2021
Diffstat (limited to 'sys-power/apcupsd')
-rw-r--r--sys-power/apcupsd/Manifest4
-rw-r--r--sys-power/apcupsd/apcupsd-3.14.14-r2.ebuild137
-rw-r--r--sys-power/apcupsd/apcupsd-3.14.14-r3.ebuild2
-rw-r--r--sys-power/apcupsd/files/apcupsd.init.448
4 files changed, 2 insertions, 189 deletions
diff --git a/sys-power/apcupsd/Manifest b/sys-power/apcupsd/Manifest
index e767ac0c9ff1..9e1003ac6fea 100644
--- a/sys-power/apcupsd/Manifest
+++ b/sys-power/apcupsd/Manifest
@@ -8,10 +8,8 @@ AUX apcupsd-tmpfiles.conf 70 BLAKE2B 6bc5fdff60918a5ccb616e28cc3832053938accd47a
AUX apcupsd-udev.rules 328 BLAKE2B be1a8ff2eb09c045137ab2f1e48d3caa5ea9df85f766da5f9ae04786895631503d986cb184c74fd92aa6c229d34fedeab0a61dc5cad4a8fba1a799ade3f01081 SHA512 ba2ebb9f28011548c845a81f17a328b98ec8d79c1e6be33aeab863d77b9d3aa61b4dfbd1bb89a0cae00465387dffe8cc223634a6e9a2f59170846d4bed9e7135
AUX apcupsd.conf 12475 BLAKE2B c7695035887fa4fa867b2588f2ed0e2fee6c6a0086c221fec3019e3de639202287e9a35082334b8801cda38c846a0bcac714b046b1ddc1297f764bb211e42fb9 SHA512 1519d3cd47a2a73ff4148e4f74964ae841d37639616fe5b974b426983f5379db89b8793a6952389c443c56b84d0ef33f6995eccd920f71b4e5efc842a58a04e1
AUX apcupsd.init 804 BLAKE2B 7afd83a6be8b068133f6221cc2396a1fe4cab23f6dec68957b48ef7940730908e7a20e1597a21480eeffdb79314fd02505d4bafdd0b7a6bd1ff2b7c452f847ef SHA512 dd7fcc52b495c3f73bc9b2fe73bbb7c8fe3ec959ea733360d370148d617d98f34de3b48f1cb451f9a8356eb8088b06d3c736bd6cbad2bb5e9e609e37d5f2c53c
-AUX apcupsd.init.4 926 BLAKE2B a698aa40ebab7bb14f6efd05f8d1300f95e81d18aa74d2d8daa35629803f8758a56ec4f6f79f27ccc3aec9d54a53a7326f5afe72b9972de90387b751c7ca21b2 SHA512 b31d054252d0caeaeee4b3e0d7d9d0f5c1d0ad32a08f952f57fe91a36964d6a895ff26bb5514820cc8e83b7e87df1b0c508c3ae35c39f43d2be2e1cd66ef705e
AUX apcupsd.powerfail.init 397 BLAKE2B 472512906536753d3054d275707764a98094c14866da63fbc8d2d62e16a9099fdce0b61cf572a4ba862f0be13e1ed3407821ed07ec90f9c77fb8d95f18aafc2f SHA512 cd0ed9d24a8371de7920bf0ce2e89bb63c0bee58da1ac782ed2b929068f95b2af47458529223a33ecea4e8f73ddfe3a7b9591af6f64828de7ed1d91e2edbb6e1
AUX apcupsd.service 111 BLAKE2B bf2ac8161af5b971642298c30b08ad78d289044bb2452bdef39b31119b60eceb0a14add7c00262132bb80dbf1964103242452cb8d9b815d6ec82c204100ea184 SHA512 011e3e52e7909f36fb73b6064277a69e5db41263cfc72bda07e326172396d5318cd2b050f1fb84c4cc6da7a247c0035c36c55322ffb234a1cfa7bf13ba492889
DIST apcupsd-3.14.14.tar.gz 1843409 BLAKE2B 48a3b249780064d699d86b658584aa222ce9f3b46a81209110b4684bf737cca7492b87b063154864ce76478f29f73cda83ab96b47f4a7aa7aa91e29a8abbf4a8 SHA512 c953bbf3e08f809748a7978a3952604176390d1cd276f187fe096d9bc3c8993b52127e8350c0363387da41318e24b4d1e00ea58df71f3bb8f50c9a5a64cd2d7f
-EBUILD apcupsd-3.14.14-r2.ebuild 4042 BLAKE2B 3c71cb4717d389d1d6ff192c9654df79c515efde571b62e7a58bbf3dcd270220fba0611cc85f258255d95f989006c9a3521e62030b9fe2780aa48ca344c03bdb SHA512 864ed6f867c2f289318bd7ac8a1f123758bedf76f729c5304d84cf4a56e46313dc83054e2081e18e8a71a303e9da68d1e239e13b61e1b092d6e40a28c3ea6c09
-EBUILD apcupsd-3.14.14-r3.ebuild 4309 BLAKE2B 8951b63af6533640e2182e17138f578f55ed6b2481cf392a55a430ff4b4ee66ed5c21fd4ef183885bbb1371eb97b2169bcf4af4280fc72c9472f47c5b5e912d9 SHA512 d0257f7e2d11f3eabc89bac089bf0c85e783022310b774486ddd7ef44fc1a02544d95ed3427d88e72296042c2236b979b5c828c99a182362917c006a8828f977
+EBUILD apcupsd-3.14.14-r3.ebuild 4306 BLAKE2B 48b356efee68c740c83de6492703c06c4b54856caf510efe935f989597d64c38ba843ffd1d3591ac415ba7f09358f020bfa33f4acc9cf16c0d0166927f669c16 SHA512 0af5a41ea08f2931aaf2ff75666ae8c0a9242d9a8d4380037b9ea4eb4474cb2b37dd0f00efb3f656a0f5c7fccae4131d0846934b4110794560af2d962398c430
MISC metadata.xml 1161 BLAKE2B 6ea52dc98c841f0f6e018f74addd11054ddedc635d0f153f5f629b6949eebc0833d3c5a7e27a584a0344dc48319de2cf85d0304dd03ba77927244654713a2488 SHA512 384db8369118c9d430e4baea4d65bef498ec4f198e0379581eac77f081fb34705ce5171fec4753beeaa5ae3c153fe98a91dbebbd04ce5c671172c7ba28d30dfe
diff --git a/sys-power/apcupsd/apcupsd-3.14.14-r2.ebuild b/sys-power/apcupsd/apcupsd-3.14.14-r2.ebuild
deleted file mode 100644
index 85882863d8e3..000000000000
--- a/sys-power/apcupsd/apcupsd-3.14.14-r2.ebuild
+++ /dev/null
@@ -1,137 +0,0 @@
-# Copyright 1999-2021 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=6
-
-inherit linux-info flag-o-matic systemd udev tmpfiles
-
-DESCRIPTION="APC UPS daemon with integrated tcp/ip remote shutdown"
-HOMEPAGE="http://www.apcupsd.org/"
-SRC_URI="mirror://sourceforge/apcupsd/${P}.tar.gz"
-
-LICENSE="GPL-2"
-SLOT="0"
-KEYWORDS="amd64 ~arm ppc x86"
-IUSE="snmp +usb +modbus cgi gnome kernel_linux"
-
-DEPEND="
- >=sys-apps/util-linux-2.23[tty-helpers(-)]
- modbus? ( usb? ( virtual/libusb:0 ) )
- cgi? ( >=media-libs/gd-1.8.4 )
- snmp? ( >=net-analyzer/net-snmp-5.7.2 )
- gnome? ( >=x11-libs/gtk+-2.4.0:2
- dev-libs/glib:2
- >=gnome-base/gconf-2.0 )"
-RDEPEND="${DEPEND}
- virtual/mailx"
-
-CONFIG_CHECK="~USB_HIDDEV ~HIDRAW"
-ERROR_USB_HIDDEV="CONFIG_USB_HIDDEV: needed to access USB-attached UPSes"
-ERROR_HIDRAW="CONFIG_HIDRAW: needed to access USB-attached UPSes"
-
-DOCS=( ChangeLog ReleaseNotes )
-HTML_DOCS=( doc/manual )
-PATCHES=( "${FILESDIR}/${PN}-3.14.9-aliasing.patch" )
-
-pkg_setup() {
- if use kernel_linux && use usb && linux_config_exists; then
- check_extra_config
- fi
-}
-
-src_configure() {
- local myconf
- use cgi && myconf="${myconf} --enable-cgi --with-cgi-bin=/usr/libexec/${PN}/cgi-bin"
- if use usb; then
- myconf="${myconf} --with-upstype=usb --with-upscable=usb --enable-usb --with-dev= "
- use modbus && myconf="${myconf} --enable-modbus-usb"
- else
- myconf="${myconf} --with-upstype=apcsmart --with-upscable=smart --disable-usb"
- use modbus || myconf="${myconf} --disable-modbus"
- fi
-
- # We force the DISTNAME to gentoo so it will use gentoo's layout also
- # when installed on non-linux systems.
- econf \
- --sbindir=/sbin \
- --sysconfdir=/etc/apcupsd \
- --with-pwrfail-dir=/etc/apcupsd \
- --with-lock-dir=/run/apcupsd \
- --with-pid-dir=/run/apcupsd \
- --with-log-dir=/var/log \
- --with-nis-port=3551 \
- --enable-net --enable-pcnet \
- --with-distname=gentoo \
- $(use_enable snmp) \
- $(use_enable gnome gapcmon) \
- ${myconf} \
- APCUPSD_MAIL=$(type -p mail)
-}
-
-src_compile() {
- # Workaround for bug #280674; upstream should really just provide
- # the text files in the distribution, but I wouldn't count on them
- # doing that anytime soon.
- MANPAGER=$(type -p cat) \
- emake
-}
-
-src_install() {
- emake DESTDIR="${D}" install
- rm -f "${D}"/etc/init.d/halt || die
-
- insinto /etc/apcupsd
- newins examples/safe.apccontrol safe.apccontrol
- doins "${FILESDIR}"/apcupsd.conf
-
- doman doc/*.8 doc/*.5
-
- einstalldocs
-
- rm "${D}"/etc/init.d/apcupsd || die
- newinitd "${FILESDIR}/${PN}.init.4" "${PN}"
- newinitd "${FILESDIR}/${PN}.powerfail.init" "${PN}".powerfail
-
- systemd_dounit "${FILESDIR}"/${PN}.service
- dotmpfiles "${FILESDIR}"/${PN}-tmpfiles.conf
-
- # remove hal settings, we don't really want to have it around still.
- rm -r "${D}"/usr/share/hal || die
-
- # replace it with our udev rules if we're in Linux
- if use kernel_linux; then
- udev_newrules "${FILESDIR}"/apcupsd-udev.rules 60-${PN}.rules
- fi
-
-}
-
-pkg_postinst() {
- tmpfiles_process ${PN}-tmpfiles.conf
-
- if use cgi; then
- elog "The cgi-bin directory for ${PN} is /usr/libexec/${PN}/cgi-bin."
- elog "Set up your ScriptAlias or symbolic links accordingly."
- fi
-
- elog ""
- elog "Since version 3.14.0 you can use multiple apcupsd instances to"
- elog "control more than one UPS in a single box with openRC."
- elog "To do this, create a link between /etc/init.d/apcupsd to a new"
- elog "/etc/init.d/apcupsd.something, and it will then load the"
- elog "configuration file at /etc/apcupsd/something.conf."
- elog ""
-
- elog 'If you want apcupsd to power off your UPS when it'
- elog 'shuts down your system in a power failure, you must'
- elog 'add apcupsd.powerfail to your shutdown runlevel:'
- elog ''
- elog ' \e[01m rc-update add apcupsd.powerfail shutdown \e[0m'
- elog ''
-
- if use kernel_linux; then
- elog "Starting from version 3.14.9-r1, ${PN} installs udev rules"
- elog "for persistent device naming. If you have multiple UPS"
- elog "connected to the machine, you can point them to the devices"
- elog "in /dev/apcups/by-id directory."
- fi
-}
diff --git a/sys-power/apcupsd/apcupsd-3.14.14-r3.ebuild b/sys-power/apcupsd/apcupsd-3.14.14-r3.ebuild
index 12e0b16bcc7e..091aa54ab76d 100644
--- a/sys-power/apcupsd/apcupsd-3.14.14-r3.ebuild
+++ b/sys-power/apcupsd/apcupsd-3.14.14-r3.ebuild
@@ -11,7 +11,7 @@ SRC_URI="mirror://sourceforge/apcupsd/${P}.tar.gz"
LICENSE="GPL-2"
SLOT="0"
-KEYWORDS="~amd64 ~arm ~ppc ~x86"
+KEYWORDS="amd64 ~arm ppc x86"
IUSE="snmp +usb +modbus cgi gnome kernel_linux"
DEPEND=">=sys-apps/util-linux-2.23[tty-helpers(-)]
diff --git a/sys-power/apcupsd/files/apcupsd.init.4 b/sys-power/apcupsd/files/apcupsd.init.4
deleted file mode 100644
index ebd6b9755d4f..000000000000
--- a/sys-power/apcupsd/files/apcupsd.init.4
+++ /dev/null
@@ -1,48 +0,0 @@
-#!/sbin/openrc-run
-# Copyright 1999-2013 Gentoo Foundation
-# Distributed under the terms of the GNU General Public License v2
-
-INSTANCE="${SVCNAME#*.}"
-if [ -z "${INSTANCE}" ] || [ "${SVCNAME}" = "apcupsd" ]; then
- INSTANCE="apcupsd"
-fi
-
-dir="/run/apcupsd"
-
-depend() {
- use net
-}
-
-start_pre() {
- checkpath -d -m 0775 -o root:uucp ${dir}
-}
-
-start() {
- rm -f /etc/apcupsd/powerfail
-
- export SERVICE="${SVCNAME}"
-
- if [ ! -d "${dir}" ]; then
- einfo " Creating ${dir}"
- /bin/mkdir -p "${dir}"
- /bin/chown root:uucp "${dir}"
- fi
-
- ebegin "Starting APC UPS daemon"
- start-stop-daemon \
- --start --pidfile "${dir}/${SVCNAME}.pid" \
- --exec /sbin/apcupsd -- \
- -f "/etc/apcupsd/${INSTANCE}.conf" \
- -P "${dir}/${SVCNAME}.pid"
- eend $?
-}
-
-stop() {
- ebegin "Stopping APC UPS daemon"
- start-stop-daemon \
- --stop --pidfile "${dir}/${SVCNAME}.pid" \
- --retry TERM/5/TERM/5 \
- --exec /sbin/apcupsd
- eend $?
-}
-