diff options
author | Stuart Shelton <stuart@shelton.me> | 2016-11-29 09:48:39 +0000 |
---|---|---|
committer | Stuart Shelton <stuart@shelton.me> | 2016-11-29 09:48:39 +0000 |
commit | b176ea56bfae2789fecef916178e84acf6beeacf (patch) | |
tree | 05ba0ceb27f58fffe8c515cc17bfce33d9fb068e /sys-power | |
parent | Update sys-devel/llvm-3.5.2, sys-devel/llvm-3.7.1-r3, sys-devel/llvm-3.8.1, s... (diff) | |
download | srcshelton-b176ea56bfae2789fecef916178e84acf6beeacf.tar.gz srcshelton-b176ea56bfae2789fecef916178e84acf6beeacf.tar.bz2 srcshelton-b176ea56bfae2789fecef916178e84acf6beeacf.zip |
Add sys-power/apcupsd-3.14.14-r1
Diffstat (limited to 'sys-power')
-rw-r--r-- | sys-power/apcupsd/Manifest | 1 | ||||
-rw-r--r-- | sys-power/apcupsd/apcupsd-3.14.14-r1.ebuild | 153 |
2 files changed, 154 insertions, 0 deletions
diff --git a/sys-power/apcupsd/Manifest b/sys-power/apcupsd/Manifest index 7d7db661..55e39cf9 100644 --- a/sys-power/apcupsd/Manifest +++ b/sys-power/apcupsd/Manifest @@ -19,4 +19,5 @@ EBUILD apcupsd-3.14.10-r6.ebuild 4380 SHA256 d9451799a5d14deafdbc81a5a4a06496403 EBUILD apcupsd-3.14.12-r1.ebuild 4805 SHA256 c38e97a7dec1c767150803fd07279d3e901d7c9dc6f9694fab621df04184623c SHA512 71346989df35103e58d770fd7fb3d8f2bdeebebc8c95079fafd965356b501a2b42bea13892b636838cb35f6854f90d198f3fd443fbc18bd35edac68665847e35 WHIRLPOOL a1d2e39f3ff173760686b9812c10d2ac8fc712d9a7e5d48e4d0182b66348928e0bacacc577d21a1a15486e041cba5a98d450f1e819710463c95c4d0e3ea6f810 EBUILD apcupsd-3.14.12.ebuild 4760 SHA256 73de4255407b8f3590128f77f3877275be292431798f50522b6d8e5bb8786aa8 SHA512 9f7f43e5f716c98d0562725067317ea40f4735210e7bdb31497062d6fa304dc83380783febde4704495897c4f118c9a7b7931d50d07912078a6d108630cfb2fc WHIRLPOOL a0eafe311ab166237b1fe0c458f5956153483db482b67bc7cbcae1de413207cae718635123d69cf260dc26b186c1d6c0cd7954b5e5854d075f121abd4475743f EBUILD apcupsd-3.14.13.ebuild 4802 SHA256 c1b0c2615c996a1511a741f799e981d61d895d04f66bb111cd50245191e43a0e SHA512 ec9027ad9bf6c1b4e83e5ec3472be5fea84cb446619821874418ae0f382651411c21ef5b1bf20a22ce266a3d112180742fd147d480af72cbeb36cb221d78ecf8 WHIRLPOOL 6b5d7ecc7d286ce069662b2cc33bb42e8fbaabf33c41fe9886ea151152a5b83822acb2ad18acd32fd14b2669ea17ea1c92b8a53edd4cdbaf9089f59b574288f5 +EBUILD apcupsd-3.14.14-r1.ebuild 4539 SHA256 a5c201a1fe79947981521a13c5eae079199246eba9a5d3ff76095f06be926823 SHA512 fff2f52be4cd39d2b12ff5d21695fe261ca5dd082297d3f741c14407eb931e6b47ae63e9cf02a95c6f576f0f7201b0ed48a091c930afdef72d4e8fce52fbc210 WHIRLPOOL e8d7de7e3caf8a4caf3982440358e3a779108db1d87a6d132f3870183d8edf4ee9f219a5e01bb626d27bebaaa227d207e5e6348849e52107c2c695431145dde0 EBUILD apcupsd-3.14.14.ebuild 4516 SHA256 fae50cef0a50406459a50096ded1ab6d27a20812aa81ae0001b6c7abeefd6d3c SHA512 779cca44971523f5d7b28babfc769c58bd599498a869b621d185738e923c12d7657aadeffcbd63307327df3848051b14887130cfa9bcc6fa77ed699b2dc7d178 WHIRLPOOL a75315f778f27e90ccd8a9b0a9c3a72e5fc889857a9115afd71d40fd78fb6657520b5b05c882ce51485b73ecd449adb7547af8b9de21f6b2aa052c234c6b50a5 diff --git a/sys-power/apcupsd/apcupsd-3.14.14-r1.ebuild b/sys-power/apcupsd/apcupsd-3.14.14-r1.ebuild new file mode 100644 index 00000000..866f765b --- /dev/null +++ b/sys-power/apcupsd/apcupsd-3.14.14-r1.ebuild @@ -0,0 +1,153 @@ +# Copyright 1999-2016 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Id: 766685f706bed62661275bee69be1eac05d68653 $ + +EAPI=5 + +inherit eutils linux-info flag-o-matic systemd udev + +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 ~x86-fbsd" +IUSE="cgi dumb gnome kernel_linux +modbus +net nls +powerchute +smart snmp systemd udev +usb" + +DEPEND=" + || ( >=sys-apps/util-linux-2.23[tty-helpers(-)] + sys-freebsd/freebsd-ubin + ) + modbus? ( usb? ( virtual/libusb:0 ) ) + cgi? ( >=media-libs/gd-1.8.4 ) + nls? ( sys-devel/gettext ) + 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" + +pkg_setup() { + if use kernel_linux && use usb && linux_config_exists; then + check_extra_config + fi +} + +src_prepare() { + epatch "${FILESDIR}/${PN}-3.14.9-aliasing.patch" +} + +src_configure() { + local myconf="--disable-test" + 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 --with-dev= " + elif use modbus; then + myconf="${myconf} --with-upstype=modbus --with-upscable=modbus" + else + myconf="${myconf} --with-upstype=apcsmart --with-upscable=smart" + fi + + if use net; then + myconf="${myconf} --with-nis-port=3551 $(use_enable powerchute pcnet )" + else + sed -i -e '/^NISSRV_ENABLED=yes$/{s:yes:no:}' configure || die "NIS patch failed" + 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=/var/lock \ + --with-pid-dir=/var/run/apcupsd \ + --with-log-dir=/var/log \ + --with-distname=gentoo \ + $(use_enable dumb ) \ + $(use_enable gnome gapcmon) \ + $(use_enable modbus ) \ + $(use_enable net ) \ + $(use_enable smart apcsmart ) \ + $(use_enable snmp ) \ + $(use_enable usb ) \ + ${myconf} \ + APCUPSD_MAIL=/bin/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 || die "emake failed" +} + +src_install() { + emake DESTDIR="${D}" install || die "installation failed" + rm -f "${D}"/etc/init.d/halt || die + + insinto /etc/apcupsd + newins examples/safe.apccontrol safe.apccontrol + doins "${FILESDIR}"/apcupsd.conf + + dodoc ChangeLog* ReleaseNotes + doman doc/*.8 doc/*.5 + + dohtml -r doc/manual/* + + rm "${D}"/etc/init.d/apcupsd || die + newinitd "${FILESDIR}/${PN}.init.4" "${PN}" + newinitd "${FILESDIR}/${PN}.powerfail.init" "${PN}".powerfail + + if use systemd; then + systemd_dounit "${FILESDIR}"/${PN}.service + systemd_dotmpfilesd "${FILESDIR}"/${PN}-tmpfiles.conf + fi + + # 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 udev && use kernel_linux; then + udev_newrules "${FILESDIR}"/apcupsd-udev.rules 60-${PN}.rules + fi + +} + +pkg_postinst() { + 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 +} + +# vi: set diffopt=iwhite,filler: |