diff options
author | 2014-07-01 00:24:12 +0100 | |
---|---|---|
committer | 2014-07-01 00:24:12 +0100 | |
commit | 9c6fe68162799313469cfd98ef45929ff324bca1 (patch) | |
tree | d088936d8adbc789a22ed13601f16c56652c6730 /sys-power | |
parent | Update net-analyzer/darkstat Manifest (diff) | |
download | srcshelton-9c6fe68162799313469cfd98ef45929ff324bca1.tar.gz srcshelton-9c6fe68162799313469cfd98ef45929ff324bca1.tar.bz2 srcshelton-9c6fe68162799313469cfd98ef45929ff324bca1.zip |
Add sys-power/apcupsd-3.14.12 with USE="snmp" fix
Diffstat (limited to 'sys-power')
-rw-r--r-- | sys-power/apcupsd/Manifest | 2 | ||||
-rw-r--r-- | sys-power/apcupsd/apcupsd-3.14.12.ebuild | 158 |
2 files changed, 160 insertions, 0 deletions
diff --git a/sys-power/apcupsd/Manifest b/sys-power/apcupsd/Manifest index fe97d97b..eb765276 100644 --- a/sys-power/apcupsd/Manifest +++ b/sys-power/apcupsd/Manifest @@ -10,6 +10,8 @@ AUX apcupsd.init.4 1041 SHA256 29bcf22843bb915303bef645b60d035164bf0d8b629825841 AUX apcupsd.powerfail.init 520 SHA256 eee773aa07175674085cb0ab7ed2c071fcc04fc05383d368f38d056e7327ff35 SHA512 d946d9b3427e0269d87aba1d6048cc4c73d767b1f5bc7d112718b82ec60076123e302dc0a73a4e5bbb7d1137ff78fc87a61983622a765341cfd7a79dcd0817ad WHIRLPOOL 1639496c976c6b654c20b953d675916636e44e7e3097696850bd202c91a9ffb713b398a86a2777b93472bccd3179aa83fb63ce43a1bbbe47e99f320ba8282a9c AUX apcupsd.service 111 SHA256 fef0b088daa7d652b8c30e6105318cff547ad2504627efabd014083eabc7182d SHA512 011e3e52e7909f36fb73b6064277a69e5db41263cfc72bda07e326172396d5318cd2b050f1fb84c4cc6da7a247c0035c36c55322ffb234a1cfa7bf13ba492889 WHIRLPOOL 940b6eb812c010f32b4bf54fd3e1b8d0a47890fd88acd8451bccbf6d17ab894915b179c110dda561c120e346ed20ca481f47761b9a5bac1e3b323457fbbc6f5a DIST apcupsd-3.14.10.tar.gz 1336852 SHA256 0707b5ec9916fbde9e44eb8d18037c8d8f75dfd6aeef51aba5487e189eef2032 SHA512 f95918bff783cb60fa40b03a532ee7447293b0542f44f2f9ecf36ee028df3aa414f01e2b834a28fc319d88ec2e84c81314cd546b5628554176f2ca47fdc66bbc WHIRLPOOL 1fb40a5199eb8dfcd287bab08c2bbf51f02a3657ba615e16395d5f377bc9a5b6144db24b83ef5e9172ff970a715f87f685118a035c00372c34702984fac02d38 +DIST apcupsd-3.14.12.tar.gz 2014699 SHA256 1b4f703cb19cfdf44daf173dc8394cafd30fee0b30a0c75a7d19db622454a440 SHA512 2ed409ce4c7c7af667cecf0c73c47315d7516c696383c811945ead720afc146fe2ceda0efef722c3208a1b41a7d4661c9544bc4fe37a36ca4779a5dc1621f3d4 WHIRLPOOL 13a2491e4ad5446ba91a075f7408e48e94a35885288c9ee6108891d89412be5c81f69f4ab5064f86b8bece8c0de44357e4c378d05aad5d9d27bd85f0d95a83d5 EBUILD apcupsd-3.14.10-r1.ebuild 4106 SHA256 4b16ea408b67ceac28b5940fe0e7b261f09ec2d9e995a3134a40083fab485f9a SHA512 3e2daacdd3034c705b365a1032c033acad47cd78ae538aa5e12002b5715c738f2d6d357d394b195df3efb00c0530e96c933f62221d3dbd469b0c3cc7adf1eff8 WHIRLPOOL 96fcc3dc10d4e9ba9c5d9f98bcd34f805bcced8639edf0138143a2845bde5273c628e1e0fa5e2258e1ca9935d315b5c0efbbca8a042ab55e41823b926655eac0 EBUILD apcupsd-3.14.10-r2.ebuild 4223 SHA256 0eacd497d6b82c9a92f3444698007b08a75a060bad7443309c8c25f93fae397f SHA512 e3586d453b028a4d44d9c823a944907f47d6ea1a1d5fa887941052417601579149d1e6dc8e521d47bf68fc1ae1fc24150e5cc9ca7b0beb0a80d36c1ef307a61e WHIRLPOOL 28adb4150904bea7ba3038a9fb4df595b7a61f9061305883a2fad61fc7cbef9c0262035e185c97cdd65fea06cf415d413564ecb38b5c51d5e6bce36e23d1ae71 EBUILD apcupsd-3.14.10-r6.ebuild 4450 SHA256 f7aef954fdf7e129e710e7264d9e683a98a6b8a8ac512658b7100b47bf093bad SHA512 e7daab1f314cd8dbdc6388e1b88f0426872a29a1de98fe008c0f3c0bfc8a050a3e1a7aaf19bdbd1d5af8c6ee89738a1e142251129be0e722d9b68121c12b3b87 WHIRLPOOL 526f2e5fddc5d337666c8b3ef6be72f6d9db923f4a39967f2f9ed2809e0c0ec99a1669fb782d8f19c11d13c2db96b175316e08e49a6d8034f1b540519e6d6f41 +EBUILD apcupsd-3.14.12.ebuild 4790 SHA256 e7780e34d52abed94f22e2144612cceb2e9d4498ae0226495d91b096e732888c SHA512 3d114ceda9dee32cce1f094a2e566bff22b9aaf6d4f6a81b8021d2af9402440ab440e8abbff4c173c72f9bde33ae83c3615e2ece9c2db4b89f5474043f6fdf1b WHIRLPOOL 97004a9ba5aa0a55a5c680a1839966b163ad158d5b83f1f72595cf62d013d2f6d265ebc39c521953f19fc13523c89eb44e307f6aceba47b6986e03b500caa47f diff --git a/sys-power/apcupsd/apcupsd-3.14.12.ebuild b/sys-power/apcupsd/apcupsd-3.14.12.ebuild new file mode 100644 index 00000000..ef66e6c2 --- /dev/null +++ b/sys-power/apcupsd/apcupsd-3.14.12.ebuild @@ -0,0 +1,158 @@ +# Copyright 1999-2014 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Header: /var/cvsroot/gentoo-x86/sys-power/apcupsd/apcupsd-3.14.12.ebuild,v 1.3 2014/06/25 21:44:21 mattm Exp $ + +EAPI=4 + +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="snmp +usb cgi dumb gnome kernel_linux +modbus +net nls +powerchute +smart systemd udev" + +DEPEND=" + || ( >=sys-apps/util-linux-2.23[tty-helpers(-)] + <=sys-apps/sysvinit-2.88-r4 + sys-freebsd/freebsd-ubin + ) + 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} + sys-apps/openrc + 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-net-snmp --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 "installed failed" + rm -f "${D}"/etc/init.d/halt + + 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 + 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 + else + # Without this it'll crash at startup. When merging in ROOT= this + # won't be created by default, so we want to make sure we got it! + keepdir /var/lock + fowners root:uucp /var/lock + fperms 0775 /var/lock + fi + + # remove hal settings, we don't really want to have it around still. + rm -r "${D}"/usr/share/hal + + # 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 +} |