aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorStuart Shelton <stuart@shelton.me>2016-09-30 00:00:34 +0100
committerStuart Shelton <stuart@shelton.me>2016-09-30 00:00:34 +0100
commitd2f4946868bfce7ee5041221c9c38a06d565189e (patch)
tree309588cc0dda032faae5cb24ba508137e70275d9 /sys-power
parentUpdate Manifest for media-sound/logitechmediaserver-bin (diff)
downloadsrcshelton-d2f4946868bfce7ee5041221c9c38a06d565189e.tar.gz
srcshelton-d2f4946868bfce7ee5041221c9c38a06d565189e.tar.bz2
srcshelton-d2f4946868bfce7ee5041221c9c38a06d565189e.zip
Add sys-power/apcupsd-3.14.14
Diffstat (limited to 'sys-power')
-rw-r--r--sys-power/apcupsd/Manifest4
-rw-r--r--sys-power/apcupsd/apcupsd-3.14.14.ebuild152
-rwxr-xr-xsys-power/apcupsd/files/apcupsd.init.417
3 files changed, 160 insertions, 13 deletions
diff --git a/sys-power/apcupsd/Manifest b/sys-power/apcupsd/Manifest
index 6a9748c3..d65818bd 100644
--- a/sys-power/apcupsd/Manifest
+++ b/sys-power/apcupsd/Manifest
@@ -6,15 +6,17 @@ AUX apcupsd-udev.rules 328 SHA256 0865097a99b321301ec5b0bb51d0560a01df0a21cca0ee
AUX apcupsd.conf 12471 SHA256 4dbb52c93728fb1daaa0a35b02c48fd10e3016b9d805e8dab0d68b237ea24eb9 SHA512 3b21f9ea39ceaebcaa330717ce1f68d77caeaaa957336560418dc793abf6a66175fa9dbcc739b0e9d9a7c14cc44fa48a69efbcabb27ed31f1f5e1de609cf6b40 WHIRLPOOL 79afe7f7e357b579a2e0a47a8ab612ec6c4356a1b0b622928b37f93d6f2a55c7d198e2b5d903e54f92108f3734b90a9f6b1963b13f56ad3dad9765bfd147123d
AUX apcupsd.init.2a 844 SHA256 86be1bafb0cf72db61def444361c659e5c36d0e44b1a007772b3f49aa0e95bcb SHA512 e86dfc3b7b8a0dbca59225795a5e996176b9a064720f4c2f6c1efc27cdf2eb0ecbdb59180b24abde1af730b834303fdf31564ec3b86a46d29ebe19abfdd48494 WHIRLPOOL e7d1e8dcb61862061d1889436c9157d95ed6a86a60aca54a0dda2120f3f5410fb700c0d889841b2013808faa349f90033a34e53eecd407df4089c58fea551f56
AUX apcupsd.init.3 659 SHA256 c3186646f06666ebd1ef265f5f6d56aeff27587face610d5f73c625b5c6053cc SHA512 fdaf68b4191dd04616c81035f8cfeafccb400a55273675b4125e67d28c3d23dc08446805e6553c868abf474773ce3a1fb36acbfbad9b85e4b6a57b7a170e01b2 WHIRLPOOL 0ea76a163c008f01d0bf8aa09219cce3a4ba6ada9f88d70b660dc06815227df37fdc82eb1b6987ec76a2cafc4f9cafa842d4ad9d81d017ef1c6d450efb077bc8
-AUX apcupsd.init.4 1229 SHA256 d3df1edf9fd2e4cc1912853f01b867974b455b94b78d358bb352fc3341eea6ca SHA512 fe48fbdaf11beb957f3c826f8cf03576c2ac78e1a2958d650bc56b068bd2f6b6c69e63912c1dba8cc487af72aa7d628e4ebb6331329c6b60c2b8d1c0e955d18d WHIRLPOOL a7b71094ca54d0966b84691e5f5aa960d32320a5bd8c716d40bf9e46a79dc104d2c064b3813a122c0e50b9f456cd6fabf07d0dc11f0296ec3fd2c156bb28dc74
+AUX apcupsd.init.4 1042 SHA256 c892862e7ad93743d6d23bcc08101be1f5af83d5c76c4633de25a71b56d1ffa7 SHA512 48eedf0df439d6154c67e33fce7c1cdfa8d7fd94175b817fd2be640121fa902cab8ef1f4f270933e6f76720b72fb831769b758a54571f84d163b6d8654f49fed WHIRLPOOL bd1a88d4b98e902c8589ed58c19803e0d7c6f652dc43bcec473c252b7286282d36e38aa89f3914cee37999be74ffb5e809cdc74a7a61f62e42d15bb319141518
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
DIST apcupsd-3.14.13.tar.gz 1935043 SHA256 57ecbde01d0448bf8c4dbfe0ad016724ae66ab98adf2de955bf2be553c5d03f9 SHA512 74f7763de268626e24f9dd99090b01d5bff35c2fde769039104105ec27941673d1613c41fcac11e3d97d2fe5c364bcc0459847fcba5d2f7f1aac85795d6d8570 WHIRLPOOL 4b6fb18848aa597bae1066a7f195747f9edfdee75a27e43e3d14e3153d4b434829c5863b7e92c0704ea652583b8c5885fd01fe7280abe93bf1c6cfc370434f73
+DIST apcupsd-3.14.14.tar.gz 1843409 SHA256 db7748559b6b4c3784f9856561ef6ac6199ef7bd019b3edcd7e0a647bf8f9867 SHA512 c953bbf3e08f809748a7978a3952604176390d1cd276f187fe096d9bc3c8993b52127e8350c0363387da41318e24b4d1e00ea58df71f3bb8f50c9a5a64cd2d7f WHIRLPOOL 9b50390558b3a6192a631ff3dce398d947fb19123969604d2a89ff69a2373beff6a62c314ce351caeb9d9b736fcb8d622a75899166a3710c4c557c5a841c5adc
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 4380 SHA256 d9451799a5d14deafdbc81a5a4a064964033c3f28544d0a53458f83ada1b6cbc SHA512 fb32641050e82e24a4a02a5e901211d1802eb3234eef95cbd58e8738a1910c2fdbb39be3a4effad8002b61c83e5fd8792de49366d5977dc5d3b0b8515f23f94f WHIRLPOOL 39fd5ff89166cab70b5c639290aec3397585bf9c0d8d046998c7f48878b30dfa13a43d4b392166a9e3169d2ceb954f6579140cf851d57d45f4390a38f09e0179
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.ebuild 4516 SHA256 fae50cef0a50406459a50096ded1ab6d27a20812aa81ae0001b6c7abeefd6d3c SHA512 779cca44971523f5d7b28babfc769c58bd599498a869b621d185738e923c12d7657aadeffcbd63307327df3848051b14887130cfa9bcc6fa77ed699b2dc7d178 WHIRLPOOL a75315f778f27e90ccd8a9b0a9c3a72e5fc889857a9115afd71d40fd78fb6657520b5b05c882ce51485b73ecd449adb7547af8b9de21f6b2aa052c234c6b50a5
diff --git a/sys-power/apcupsd/apcupsd-3.14.14.ebuild b/sys-power/apcupsd/apcupsd-3.14.14.ebuild
new file mode 100644
index 00000000..c18f09d3
--- /dev/null
+++ b/sys-power/apcupsd/apcupsd-3.14.14.ebuild
@@ -0,0 +1,152 @@
+# Copyright 1999-2016 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id: 02c1086791dea04cd2534537f8e2acb9d58ce46e $
+
+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="snmp +usb cgi dumb gnome kernel_linux +modbus +net nls +powerchute +smart systemd udev"
+
+DEPEND="
+ || ( >=sys-apps/util-linux-2.23[tty-helpers(-)]
+ 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}
+ 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 || 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:
diff --git a/sys-power/apcupsd/files/apcupsd.init.4 b/sys-power/apcupsd/files/apcupsd.init.4
index 4caf4d27..56d84479 100755
--- a/sys-power/apcupsd/files/apcupsd.init.4
+++ b/sys-power/apcupsd/files/apcupsd.init.4
@@ -1,7 +1,7 @@
-#!/sbin/runscript
+#!/sbin/openrc-run
# Copyright 1999-2013 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/sys-power/apcupsd/files/apcupsd.init.4,v 1.2 2013/12/03 22:18:44 mattm Exp $
+# $Id: 2a69687db89da28955a9567dd4c6084f68c42908 $
INSTANCE="${SVCNAME#*.}"
if [ -z "${INSTANCE}" ] || [ "${SVCNAME}" = "apcupsd" ]; then
@@ -15,6 +15,8 @@ depend() {
}
start_pre() {
+ local lockdir="$( grep -E '^\s*LOCKFILE\s+' "/etc/apcupsd/${INSTANCE}.conf" | sed -r 's/\s*LOCKFILE\s+//' )"
+ checkpath -d -m 0775 -o root:uucp ${lockdir}
checkpath -d -m 0775 -o root:uucp ${piddir}
}
@@ -23,16 +25,6 @@ start() {
export SERVICE="${SVCNAME}"
- local lockdir="$( grep -E '^\s*LOCKFILE\s+' "/etc/apcupsd/${INSTANCE}.conf" | sed -r 's/\s*LOCKFILE\s+//' )"
- local dir
- for dir in "${piddir}" "${lockdir}"; do
- if [ ! -d "${dir}" ]; then
- einfo " Creating ${dir}"
- /bin/mkdir -p "${dir}"
- fi
- done
- /bin/chown root:uucp "${piddir}"
-
ebegin "Starting APC UPS daemon"
start-stop-daemon \
--start --pidfile "${piddir}/${SVCNAME}.pid" \
@@ -50,3 +42,4 @@ stop() {
--exec /sbin/apcupsd
eend $?
}
+