summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMatt Thode <prometheanfire@gentoo.org>2014-07-24 04:42:54 +0000
committerMatt Thode <prometheanfire@gentoo.org>2014-07-24 04:42:54 +0000
commita12c5ea4830ea8f82b86a76c4c9857be17cc54fc (patch)
treef24963bed674e979d81ea9bd684c94a529590804 /sys-power
parentBeta channel bump. (diff)
downloadhistorical-a12c5ea4830ea8f82b86a76c4c9857be17cc54fc.tar.gz
historical-a12c5ea4830ea8f82b86a76c4c9857be17cc54fc.tar.bz2
historical-a12c5ea4830ea8f82b86a76c4c9857be17cc54fc.zip
bumping for bug 517060
Package-Manager: portage-2.2.8-r1/cvs/Linux x86_64 Manifest-Sign-Key: 0x2471EB3E40AC5AC3
Diffstat (limited to 'sys-power')
-rw-r--r--sys-power/nut/ChangeLog8
-rw-r--r--sys-power/nut/Manifest33
-rw-r--r--sys-power/nut/files/nut-2.7.2/nut-2.7.2-no-libdummy.patch13
-rw-r--r--sys-power/nut/nut-2.7.2.ebuild275
4 files changed, 313 insertions, 16 deletions
diff --git a/sys-power/nut/ChangeLog b/sys-power/nut/ChangeLog
index 69176d464b57..af4ceaaa2aa2 100644
--- a/sys-power/nut/ChangeLog
+++ b/sys-power/nut/ChangeLog
@@ -1,6 +1,12 @@
# ChangeLog for sys-power/nut
# Copyright 1999-2014 Gentoo Foundation; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo-x86/sys-power/nut/ChangeLog,v 1.114 2014/06/29 08:28:45 swift Exp $
+# $Header: /var/cvsroot/gentoo-x86/sys-power/nut/ChangeLog,v 1.115 2014/07/24 04:42:46 prometheanfire Exp $
+
+*nut-2.7.2 (24 Jul 2014)
+
+ 24 Jul 2014; Matthew Thode <prometheanfire@gentoo.org>
+ +files/nut-2.7.2/nut-2.7.2-no-libdummy.patch, +nut-2.7.2.ebuild:
+ bumping for bug 517060
29 Jun 2014; Sven Vermeulen <swift@gentoo.org> nut-2.6.0-r1.ebuild,
nut-2.6.2.ebuild, nut-2.6.3.ebuild, nut-2.6.5-r1.ebuild, nut-2.6.5.ebuild,
diff --git a/sys-power/nut/Manifest b/sys-power/nut/Manifest
index 503b933284c9..fe333322c1e4 100644
--- a/sys-power/nut/Manifest
+++ b/sys-power/nut/Manifest
@@ -15,34 +15,37 @@ AUX nut-2.6.5-init.d-upslog 691 SHA256 c9412210a3606a0d9ce0b88a8db59307a1c699a10
AUX nut-2.6.5-init.d-upsmon 675 SHA256 654b74fce8e63e98abcab3c7e0b1903a39bd8672dcd5cf740b10209859b1d012 SHA512 4f797f8c72679410c9897d41bbccd4b842d08984e31e8a4729e823636970919854680162a88180cb73d3467db09d3c586d4c0e964bc0ddb5895cd32a88db7504 WHIRLPOOL 587435910808e3eac012b4d8af705aee631aeaedaceaf08598bb384a433aafe3f54b3dd254ee9654dfc85d73b9b53656d6b97674c5edb1ef580fc36134584553
AUX nut-2.7.1-fix-scanning.patch 2311 SHA256 32f375e084b8250bbcbbd402517ca720040e1bf5302e0f242c3ea6e0ad62665d SHA512 9695b77af0e2bfbec62f6b2686c6d2c65211a369d671907fcb191e0da7d9765f50587cf193a4fc0fbd12c6d8f4d5beb900dc4bb8dc04133bb1b01f078561de50 WHIRLPOOL 2aef54dd8b0b442f3e1e68b1b3018ea2431042e667e66450c2d737fc60c73de0600a221ac91489533b7758968087264af05ef41d1edda374bbb95aa6b31207fa
AUX nut-2.7.1-snmpusb-order.patch 1417 SHA256 1f2d8bd74cebf61c711130046a8fee99d29fa482d2b1a235816c6348a16acd49 SHA512 df3701821bc4ef45a5089e4d4439c3367fb23cefce7d06168bd422a8c32a1b373ae9fb3456bd5f90a51a672edf9ce29254a08c2045efe210a11b82399793ec19 WHIRLPOOL 0904f346748d16336c57cfb10741aba6a2d0e76f988925e7479dc8ae742b5fcfdd09dce531e5d5743009593fd61e9810b505b24db2f15d8d37c0bebd912abfdb
+AUX nut-2.7.2/nut-2.7.2-no-libdummy.patch 535 SHA256 3412955defbf36999896e348569e994e4b89915fcf056e6448348b1209996647 SHA512 a402a70a4cfc922d31203560627ace87f82795aef072d333cb1bfb91a6b67fbc10769e5d68a8d2741ca512b81b5754e9141b68dcb197dbe558ed5556e2de37a1 WHIRLPOOL 0a5c0012c00a5db475e28405b1f60613bc487c1d7df89e5b6505f74cc4534a7bf5b500e5288be6a4bf10543150400d6f10568affe4df4663b508596cf20d4e07
AUX nut.powerfail.initd 1420 SHA256 502001e6fea35c18c6869b492aea7ea584cde7cfd983fe78ca9ca454ac591b26 SHA512 5921fbff0fa079a362c1de67783724382f5bcbd0c75aa179641c77bc31c44562d61e027f05218022151ed0aa446b813cd2fb110baa945cbfa732d741ea9fc6d4 WHIRLPOOL ce099ce9cf57e710958446e1fb9aa6c6c837d2eb964928549e78bac2e7ef36f77d16baab33cc85afeba18b801fa4cdf9b2199391b449f3ff1ed8e730e5887510
DIST nut-2.6.0.tar.gz 1703273 SHA256 febaa230b6b5f0ad27d780851047527d36c8c7a34e557b3832d6d55174d7a0d5 SHA512 82bf03ef01931c819d550babed48806a45411083bc0a79d1e10e44ec798fb07032e0f8eda409ddd591faf4506955bd98656afc97bc6d357276de70d0ce15b775 WHIRLPOOL e7da975a7c1eafd3b9d7e90456b6924ded74e9576746a91e3692b9e58dfa24878567596fa850776a88542673a35098cc0b22ca79ec3c597dccf03ee2119c001c
DIST nut-2.6.2.tar.gz 1897691 SHA256 343554add0713348f8b09bca8d83eee2eb2ae8bad9cdad9a39e0f0e2d0f5d375 SHA512 848dfb9e1aebdab47a9892e4f2c5cba7afb87f422b7edcf5d4c8843dda917edf86d8f747ff655b2026635eb803d09c4d393b212279907e371308d3efe7bd8145 WHIRLPOOL 8beb421f168f546bfa1a763db411074dbd5ab8da8638d33c9ee0106f9102332c8ac5c8beeda0f71d5dfe89e09e0f651a4bc8d3a49e2f2177fb4c935d23bb8e68
DIST nut-2.6.3.tar.gz 1952115 SHA256 34913b729d2032faaf6f31e800a400bcd874f1f4daacae6fe0d388bd235b633a SHA512 8f6fede6c8891e9f4844cb8a82301334a33b31e832effec7f83ed756e1b263e103503f5a0178a588b29df5bc2a6eb6b6d42121cfb839c16f082ffd901788fdd4 WHIRLPOOL a6e96419b604027aa89b67d2a13dd4690185dc16cc378383a66e7a1ee72b6d35f192d39b0f71c20e284ccd449729410667c485bf0e8f5b8dc9a1e0eb83c22e78
DIST nut-2.6.5.tar.gz 2038832 SHA256 618df71cf1ca6e3700d1d3c282773a2dec85f9f20324c0d3234c824e97feb93f SHA512 f1c76e6280057dc558d53451e7de2bdc7f37a0f175b1c52c27e7dcb83deeb78f6885007ad188a7a3a19e411eba87e03eb2246310bd7a5a5bb6fa3ad2bebd49d8 WHIRLPOOL 2b189f77d18d26303c60f2c084796075b0a50b8aa9cbefc3ba9a83f037450ffc3ecdb289367435e784a6bbe8569f768a97130a1ccdf123e53f13e0cf8813fb9a
DIST nut-2.7.1.tar.gz 2259721 SHA256 71a6d73ad6d910808126ba7f217ec1142a0c6709c63a22a099e7338960b2c798 SHA512 087c63b12f44c1b0caf8ffb2c5fda213a1b2060bdc284bd7fdff38a58f190c513790438388a4ceda8772938ae56ac84ca8635666ad89f067bec4d818252158ae WHIRLPOOL 576c05ffb3feeb8bc54130493ee32b0012844edbd90ea0011c2086636f92e18fabbf55f243d192e4d588d69ee5774c11db52996abd86dd4b7ed41e39849d43ad
+DIST nut-2.7.2.tar.gz 2223307 SHA256 4d5365359b059d96dfcb77458f361a114d26c84f1297ffcd0c6c166f7200376d SHA512 7d6b44e8f2d03544d9825274f4f3039911e335eb51620ded3dc08d51aeb096281c2ec848831815c54eecd4f2a25bdb1e6e5f479422e5291f03c3055da7ba52e6 WHIRLPOOL 6e7c45ef09fc2e86f0b79787043a9bf9954b5ef57fb16f9d453734680ff947abd8fb6665c5da4dac09850f5ab6a414039aa067803ecdeb2efd8537b8909f1ff9
EBUILD nut-2.6.0-r1.ebuild 6891 SHA256 26fdabf0a40cbd7e203d82f29aabbd9545ee169fb549660c542115dd57a4e01e SHA512 f69b29e6b087546ecc87631a016c7694bbd930e30506b117967557fa08e4684d47574d850e9b1a2a5175f12e693f430e4551dd977af7780fa6d124ba4c3fb938 WHIRLPOOL 9ac56244017d7aac89bebf33ed157b8c0a186892b9bc26f71c894ffd31db0fb0518e8bb2fa9f7fcb0f00d56f2c74b77f8566e957e61e09a608e6624cce1352ca
EBUILD nut-2.6.2.ebuild 6892 SHA256 28059942af3cd7d6bd767368cc31e06604906a2923193ed4d8bc97344d412bae SHA512 c884137d288f78c5efb188397af608a5b2010e4944491d4e0fe070afc1a57ed365c8bf4a160bbf3253cd7b8a3c197e890935e64821d9e15c7f01533ca0889840 WHIRLPOOL 4e7d2d61f4a739b787680e4d463edf92184e352caee6b59e6367addf0f6cea031550803b71a1c53a41e2b1b852d9e6067c82a5b7b6e0ceed14020b930dbfdd78
EBUILD nut-2.6.3.ebuild 7001 SHA256 7219a213582b71dd10620131089569ee8a68ff2ed1767176f6b2a003a4e91aa4 SHA512 0236a4e9e40cadeeb487050dedc8fd2f30b282029f8e9a753241587f6b8c4735d8977069a5ed6a35a58e4e56097661480a5b967f19fdfe9e508fe2251917908f WHIRLPOOL 062d769275c3baa0b965ae4a86e27daf398c838f52a74650c6fead6ec968245c9da799229262d1186b79e64c539fe16a7d4606b9b7c948e23f411602c1cbaf02
EBUILD nut-2.6.5-r1.ebuild 7318 SHA256 3d6f27977610dfb57f9e405c1deffe65b488de172c569209396dc9a8cc6a142d SHA512 c8f09bb8ed2cf87ca3eff082e0291cf149d7725d2773b204b03a78d03a0480f4b17079f164d23772f87ef2d11c591b9193ddc1480c1f71b247240c5d369d846e WHIRLPOOL 041ade53af07951ad0e146bb468ceaaa9999a4e58649d4525cc1771dd8a2596e6be5bf23d1733f7de302491ae430c749a5123fa33fb67189a4da34bbfc9b1f36
EBUILD nut-2.6.5.ebuild 7006 SHA256 cd8633465ba62091581d753bc5a0960c4d7c8a73182548523f89e15109cd9c73 SHA512 33d132f22fc7e5a0babeed05c697e4680dd4fe21e785d6bb2cda1b2874e33dfbc4601331810a33386525e8b20c1bba036bd2875ab5e579f44dbabbf8d2005ca6 WHIRLPOOL 7d683f75b9af9d0cb99e2c6f6c4cb2accd72d7a5b1134b3ead400191483b9f1e3b999e179b36799b639b47b2ac572003299e5030e16038ff7a3c8aa6aef9fdf9
EBUILD nut-2.7.1.ebuild 9740 SHA256 2fabfd8ff3d50066610555ef4eed4c3b1c91e1bc21e83ca37bfa4a43287a6f53 SHA512 ebb607d13305296a93b923c230b29abe202a5a3a72a561676f979098a82a2644f844fbe70a7ccc3f20fd76ac36ff02e0905aa29cd5cfaa4f3a246d2df192596c WHIRLPOOL 98453555997bdb141684bc90e1289cdeb6233b36e8f336505f429cc1733cae9643739bb6982d1a96d3d186033d91fff661fc349d85146814f8e5f3c7d5dffd1d
-MISC ChangeLog 23985 SHA256 a01f0ed018a64ffb82f7ced9be933918e17b926f233544479fc49dc82bd93326 SHA512 731ea17d41a1d5c9cca013dee1bb34d0a06715911705f2d0f3065fedd24efabb09e6215743cd0300414c8d5df2240a7b2769ec3218df5a8e9e3d0ed136156c66 WHIRLPOOL 804c7a8058cc8dae77e0e72088bbfb2bfac33490fb702cf9fa55c70321032229f1b91eb4eced3ff35398c312beb9d8b1b504a6d39e6961f4b8188adbc4fc7a83
+EBUILD nut-2.7.2.ebuild 9550 SHA256 d052cb9fff492bc480cc37637efb1dd3edd75773576a8f0da4f03d09514946b3 SHA512 9346362006ad548a66c67ee89cf6e370160b1cc36579de8f659096c5ad9225df92dd49f937b1fb872eab5615273b156c91ed24db10eeffdeeae1a8eb7a4456e2 WHIRLPOOL 1a805d3c6ae639ebea701c443165bd30b095f15449878b76dbc430eb0ba305a3db1fef2c650ab9844b4a047510d208b4c6c2ad42e8b31272a81fb27ef7185745
+MISC ChangeLog 24170 SHA256 381847179513b1bb8e39339203f4c336a4314b2eb91e55d9c7a12e9fdeb69605 SHA512 7215adcea5f977980840e2b67a3a3602a19c412c4181ff2f4b23a336899dd1fe8b245518f6dc7c4e2cdabdac5154d9948ce128bc81e5a5743f512618334af69d WHIRLPOOL 61c0930cbc0657a83333b7b5bfc7ccc01ee1e05a89eb7bb104d21fa6b677f9ff0263c9df63ed8515e42c3cd874b97552e2426aafca081a7196c64b3b5e6606ce
MISC metadata.xml 5153 SHA256 09e74956c734541540fdd23ca7cecc7915b3919e249d716a7728c97f4040275f SHA512 9eafcc590b4624cf96a88f192b1f4bf58cc99719d0859bb2b911d162379502d40aa31c1d24c2f7dd3862f9b7ec9878a7e41de5dee99542b47fa2c28c981b91d6 WHIRLPOOL 9238c15e4163ebe94234e2d78030af7b37f09ebeb9729610c8d8fc1adab4e0af05de45f7e498d041ee1052937fd517cdbc52144ffee9f0bd582fb8b9078b13ad
-----BEGIN PGP SIGNATURE-----
-Version: GnuPG v2.0.22 (GNU/Linux)
+Version: GnuPG v2
-iQIcBAEBCAAGBQJTr84UAAoJEC7dUkA7aK9HVfQP/i+RfpOtjv9a8YoXSJDsw1Ux
-Kka4F70BsZK8ryArU8gmoHuWY288NlFPyXY07kuCh4B0TOCT2lX0OOeWTNlyC0Zw
-2Tr7HkFz2Pz1HLAfiW8+KIgiMm+031I7L+JG34ngNdFMRdLqsfWL8mB048Sa4Chc
-pC3gnij9JGlQv1FzIRAhN8NRJ2DNv1tvE2YjloguVAQYzH5JaQDkeSuNzCAi1D6o
-lPkwzYKRLvgWEm4iMJC4QRu6XXLkVn1+rKX+tPBqovNGDRvm9qPtjeHI4U5oQbLz
-aOZqlYh69fMrWMgddrN2jqubYr8BD2zm1PXAB9JlUuH1WvCYtLoML39/9ywQcbgd
-N9pEy8KkVOhlDY34LcmlI7iE0jFfz6rDDuQb6xw1OINsUA882bN3/4l/yEYSTMjt
-egC3i07AhxG8gaIFb/oKZCDN5PjylzMw7uGDwyFLmO6PUgBTO6+So1af5F6MTUdO
-NXef0HCCXlNDZvbowW/7H3BgjNGoX0dZTGFoX7gsn9TeHWpv+UMg7Sckg1iAPz/g
-1ZDY0rJuI+pp3O9G71wt1K0d/nkifi6U2bent1FXEueuIj5wcLCvEZC1Spb/g3vP
-iyi/Ny7WbtL3QwrgHMqNbo3v92WeFGhrH1Ivq+O4Ei78GRW0jyQL5RMpfU85gnXz
-Ba7ADypWaThDNhYp4+vR
-=J1bO
+iQIcBAEBCAAGBQJT0I7hAAoJECRx6z5ArFrDtnkP/RZLVkBsEHjqX0mya2EQrO+I
+rGAeKzIxLwMuLSx18FnmQvFADCHE0RZIXoLwuwKIyIV8biiHjcrif66WaBWdvH7H
+o72tjubL91OcE2n1YSjZKvz31B6ZZ+gGKQ8bGfWcAiCzkt6mV/+w1c0uE3c0dxyF
+DMHMGs0k5y80p0bmgavmpAADeTAiObOrLWnowPLpoYC6z/TnpFLDXn7w2lAm+b79
+JeNKOKlOwT0Artsu+vY8nnS6eMBgqoTCqifoDKmEIuClXARbih+r7T+rgdeWMvzv
+E9A4Skgy1C58iw+2YUzL6DMu2/QQ/Sn+rbTvZhMws6eowWCjBWFsV3xNTgG9wEdP
+VbtZqDlwlpdZw57RXF3QZGaaEr2Ri3IvuOEtUX2t8g+ri53KIfs9DYywT0Ke1LN3
+eXz+fo2XgS+GNYbcIHvs9cwybqt5rxzFDtluAQAZ0tBJeulY/LOtEQni6Bx5DicO
+Ftp4k0R69MFuDpFdEaI/pRj021N9x1UhnxHbUXkw5n0iBBz+/it96mEGjJVPc0xb
+8Wc+zw5Spl77+cBZt44wZHQNhsr88fhUwi3UmlSfYPS8uMwEfouz+kU9pbglUGfu
+K6xI1eWYolzsvYbTf3rb4td7dPMWixDDO+0XFXKcUhagcAh9CVk4jKMtI97AvXOt
+rLPvKlwP/JW3E5LNmY6t
+=Dr4Z
-----END PGP SIGNATURE-----
diff --git a/sys-power/nut/files/nut-2.7.2/nut-2.7.2-no-libdummy.patch b/sys-power/nut/files/nut-2.7.2/nut-2.7.2-no-libdummy.patch
new file mode 100644
index 000000000000..ca0d8be028f5
--- /dev/null
+++ b/sys-power/nut/files/nut-2.7.2/nut-2.7.2-no-libdummy.patch
@@ -0,0 +1,13 @@
+diff --git a/drivers/Makefile.am b/drivers/Makefile.am
+index 99614ca..42b3611 100644
+--- a/drivers/Makefile.am
++++ b/drivers/Makefile.am
+@@ -267,5 +267,6 @@ dist_noinst_HEADERS = apc-mib.h apc-hid.h baytech-mib.h bcmxcp.h \
+
+ # Define a dummy library so that Automake builds rules for the
+ # corresponding object files. This library is not actually built,
+-EXTRA_LIBRARIES = libdummy.a
+-libdummy_a_SOURCES = main.c dstate.c serial.c
++EXTRA_LIBRARIES =
++#EXTRA_LIBRARIES = libdummy.a
++#libdummy_a_SOURCES = main.c dstate.c serial.c
diff --git a/sys-power/nut/nut-2.7.2.ebuild b/sys-power/nut/nut-2.7.2.ebuild
new file mode 100644
index 000000000000..6c034a92ebcc
--- /dev/null
+++ b/sys-power/nut/nut-2.7.2.ebuild
@@ -0,0 +1,275 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/sys-power/nut/nut-2.7.2.ebuild,v 1.1 2014/07/24 04:42:46 prometheanfire Exp $
+
+EAPI=5
+inherit autotools bash-completion-r1 eutils fixheadtails multilib user systemd flag-o-matic toolchain-funcs
+
+MY_P=${P/_/-}
+
+DESCRIPTION="Network-UPS Tools"
+HOMEPAGE="http://www.networkupstools.org/"
+# Nut mirrors are presently broken
+SRC_URI="http://random.networkupstools.org/source/${PV%.*}/${MY_P}.tar.gz
+ http://www.networkupstools.org/source/${PV%.*}/${MY_P}.tar.gz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~amd64 ~arm ~ppc ~ppc64 ~x86 ~x86-fbsd"
+
+IUSE="avahi cgi ipmi snmp +usb selinux ssl tcpd xml"
+RDEPEND="avahi? ( net-dns/avahi )
+ cgi? ( >=media-libs/gd-2[png] )
+ snmp? ( net-analyzer/net-snmp )
+ usb? ( virtual/libusb:0 )
+ selinux? ( sec-policy/selinux-nut )
+ ssl? ( >=dev-libs/openssl-1 )
+ tcpd? ( sys-apps/tcp-wrappers )
+ xml? ( >=net-libs/neon-0.25.0 )
+ ipmi? ( sys-libs/freeipmi )
+ virtual/udev"
+DEPEND="$RDEPEND
+ >=sys-apps/sed-4
+ virtual/pkgconfig"
+
+S=${WORKDIR}/${MY_P}
+
+# Bug #480664 requested UPS_DRIVERS_IUSE for more flexibility in building this package
+SERIAL_DRIVERLIST="al175 bcmxcp belkin belkinunv bestfcom bestfortress bestuferrups bestups dummy-ups etapro everups gamatronic genericups isbmex liebert liebert-esp2 masterguard metasys oldmge-shut mge-utalk microdowell mge-shut oneac optiups powercom rhino safenet solis tripplite tripplitesu upscode2 victronups powerpanel blazer_ser clone clone-outlet ivtscd apcsmart apcsmart-old apcupsd-ups riello_ser nutdrv_qx"
+SNMP_DRIVERLIST="snmp-ups"
+USB_LIBUSB_DRIVERLIST="usbhid-ups bcmxcp_usb tripplite_usb blazer_usb richcomm_usb riello_usb nutdrv_qx"
+USB_DRIVERLIST=${USB_LIBUSB_DRIVERLIST}
+#HAL_DRIVERLIST="usbhid-ups bcmxcp_usb tripplite_usb blazer_usb riello_usb nutdrv_qx"
+NEONXML_DRIVERLIST="netxml-ups"
+IPMI_DRIVERLIST="nut-ipmipsu"
+# Now we build from it:
+for name in ${SERIAL_DRIVERLIST} ; do
+ IUSE_UPS_DRIVERS="${IUSE_UPS_DRIVERS} +ups_drivers_${name}"
+done
+for name in ${USB_DRIVERLIST} ; do
+ IUSE_UPS_DRIVERS="${IUSE_UPS_DRIVERS} +ups_drivers_${name}"
+ REQUIRED_USE="${REQUIRED_USE} ups_drivers_${name}? ( usb )"
+done
+for name in ${NEONXML_DRIVERLIST}; do
+ IUSE_UPS_DRIVERS="${IUSE_UPS_DRIVERS} ups_drivers_${name}"
+ REQUIRED_USE="${REQUIRED_USE} ups_drivers_${name}? ( xml )"
+done
+for name in ${SNMP_DRIVERLIST} ; do
+ IUSE_UPS_DRIVERS="${IUSE_UPS_DRIVERS} ups_drivers_${name}"
+ REQUIRED_USE="${REQUIRED_USE} ups_drivers_${name}? ( snmp )"
+done
+for name in ${IPMI_DRIVERLIST} ; do
+ IUSE_UPS_DRIVERS="${IUSE_UPS_DRIVERS} ups_drivers_${name}"
+ REQUIRED_USE="${REQUIRED_USE} ups_drivers_${name}? ( ipmi )"
+done
+IUSE="${IUSE} ${IUSE_UPS_DRIVERS}"
+
+# public files should be 644 root:root
+NUT_PUBLIC_FILES="/etc/nut/{ups,upssched}.conf"
+# private files should be 640 root:nut - readable by nut, writeable by root,
+NUT_PRIVATE_FILES="/etc/nut/{upsd.conf,upsd.users,upsmon.conf}"
+# public files should be 644 root:root, only installed if USE=cgi
+NUT_CGI_FILES="/etc/nut/{{hosts,upsset}.conf,upsstats{,-single}.html}"
+
+pkg_setup() {
+ enewgroup nut 84
+ enewuser nut 84 -1 /var/lib/nut nut,uucp
+ # As of udev-104, NUT must be in uucp and NOT in tty.
+ gpasswd -d nut tty 2>/dev/null
+ gpasswd -a nut uucp 2>/dev/null
+ # in some cases on old systems it wasn't in the nut group either!
+ gpasswd -a nut nut 2>/dev/null
+ warningmsg ewarn
+}
+
+src_prepare() {
+ #ht_fix_file configure.in
+
+ epatch "${FILESDIR}/nut-2.7.2/nut-2.7.2-no-libdummy.patch"
+ epatch "${FILESDIR}"/${PN}-2.6.2-lowspeed-buffer-size.patch
+ #epatch "${FILESDIR}"/${PN}-2.6.3-CVE-2012-2944.patch
+ #epatch "${FILESDIR}"/${PN}-2.6.5-freeipmi_fru.patch
+ epatch "${FILESDIR}"/${PN}-2.7.1-fix-scanning.patch
+ epatch "${FILESDIR}"/${PN}-2.7.1-snmpusb-order.patch
+
+ #sed -e "s:GD_LIBS.*=.*-L/usr/X11R6/lib \(.*\) -lXpm -lX11:GD_LIBS=\"\1:" \
+ # -e '/systemdsystemunitdir=.*echo.*sed.*libdir/s,^,#,g' \
+ # -i configure.in || die
+
+ sed -e "s:52.nut-usbups.rules:70-nut-usbups.rules:" \
+ -i scripts/udev/Makefile.am || die
+
+ rm -f ltmain.sh m4/lt* m4/libtool.m4
+
+ sed -i \
+ -e 's:@LIBSSL_LDFLAGS@:@LIBSSL_LIBS@:' \
+ lib/libupsclient{.pc,-config}.in || die #361685
+
+ # This file appears twice in the install list, and if both install rules
+ # trigger simultaneously during parallel-make, it fails.
+ sed -i \
+ -e '/nodist_sysconf_DATA/s,upsmon.conf.sample,,g' \
+ conf/Makefile.am || die
+
+ eautoreconf
+}
+
+src_configure() {
+ local myconf
+ append-flags -fno-lto
+ tc-export CC
+ tc-export CXX
+ tc-export AR
+
+ local UPS_DRIVERS=""
+ for u in $USE ; do
+ u2=${u#ups_drivers_}
+ [[ "${u}" != "${u2}" ]] && UPS_DRIVERS="${UPS_DRIVERS} ${u2}"
+ done
+ UPS_DRIVERS="${UPS_DRIVERS# }" UPS_DRIVERS="${UPS_DRIVERS% }"
+ myconf="${myconf} --with-drivers=${UPS_DRIVERS// /,}"
+
+ use cgi && myconf="${myconf} --with-cgipath=/usr/share/nut/cgi"
+
+ # TODO: USE flag for sys-power/powerman
+ econf \
+ --sysconfdir=/etc/nut \
+ --datarootdir=/usr/share/nut \
+ --datadir=/usr/share/nut \
+ --disable-static \
+ --with-statepath=/var/lib/nut \
+ --with-drvpath=/$(get_libdir)/nut \
+ --with-htmlpath=/usr/share/nut/html \
+ --with-user=nut \
+ --with-group=nut \
+ --with-logfacility=LOG_DAEMON \
+ --with-dev \
+ --with-serial \
+ --without-powerman \
+ $(use_with avahi) \
+ $(use_with cgi) \
+ $(use_with ipmi) \
+ $(use_with ipmi freeipmi) \
+ $(use_with snmp) \
+ $(use_with ssl) \
+ $(use_with tcpd wrap) \
+ $(use_with usb) \
+ $(use_with xml neon) \
+ $(systemd_with_unitdir) \
+ ${myconf}
+}
+
+src_install() {
+ emake DESTDIR="${D}" install || die
+
+ find "${D}" -name '*.la' -exec rm -f {} +
+
+ dodir /sbin
+ dosym /$(get_libdir)/nut/upsdrvctl /sbin/upsdrvctl
+ # This needs to exist for the scripts
+ dosym /$(get_libdir)/nut/upsdrvctl /usr/sbin/upsdrvctl
+
+ if use cgi; then
+ elog "CGI monitoring scripts are installed in /usr/share/nut/cgi."
+ elog "copy them to your web server's ScriptPath to activate (this is a"
+ elog "change from the old location)."
+ elog "If you use lighttpd, see lighttpd_nut.conf in the documentation."
+ fi
+
+ # this must be done after all of the install phases
+ for i in "${D}"/etc/nut/*.sample ; do
+ mv "${i}" "${i/.sample/}"
+ done
+
+ dodoc AUTHORS ChangeLog docs/*.txt MAINTAINERS NEWS README TODO UPGRADING || die
+
+ newdoc lib/README README.lib || die
+ newdoc "${FILESDIR}"/lighttpd_nut.conf-2.2.0 lighttpd_nut.conf || die
+
+ docinto cables
+ dodoc docs/cables/* || die
+
+ newinitd "${FILESDIR}"/nut-2.6.5-init.d-upsd upsd || die
+ newinitd "${FILESDIR}"/nut-2.2.2-init.d-upsdrv upsdrv || die
+ newinitd "${FILESDIR}"/nut-2.6.5-init.d-upsmon upsmon || die
+ newinitd "${FILESDIR}"/nut-2.6.5-init.d-upslog upslog || die
+ newinitd "${FILESDIR}"/nut.powerfail.initd nut.powerfail || die
+
+ keepdir /var/lib/nut
+
+ einfo "Setting up permissions on files and directories"
+ fperms 0700 /var/lib/nut
+ fowners nut:nut /var/lib/nut
+
+ # Do not remove eval here, because the variables contain shell expansions.
+ eval fperms 0640 ${NUT_PRIVATE_FILES}
+ eval fowners root:nut ${NUT_PRIVATE_FILES}
+
+ # Do not remove eval here, because the variables contain shell expansions.
+ eval fperms 0644 ${NUT_PUBLIC_FILES}
+ eval fowners root:root ${NUT_PUBLIC_FILES}
+
+ # Do not remove eval here, because the variables contain shell expansions.
+ if use cgi; then
+ eval fperms 0644 ${NUT_CGI_FILES}
+ eval fowners root:root ${NUT_CGI_FILES}
+ fi
+
+ # this is installed for 2.4 and fbsd guys
+ if ! has_version virtual/udev; then
+ einfo "Installing non-udev hotplug support"
+ insinto /etc/hotplug/usb
+ insopts -m 755
+ doins scripts/hotplug/nut-usbups.hotplug
+ fi
+
+ dobashcomp "${S}"/scripts/misc/nut.bash_completion
+}
+
+pkg_postinst() {
+ # this is to ensure that everybody that installed old versions still has
+ # correct permissions
+
+ chown nut:nut "${ROOT}"/var/lib/nut 2>/dev/null
+ chmod 0700 "${ROOT}"/var/lib/nut 2>/dev/null
+
+ # Do not remove eval here, because the variables contain shell expansions.
+ eval chown root:nut "${ROOT}"${NUT_PRIVATE_FILES} 2>/dev/null
+ eval chmod 0640 "${ROOT}"${NUT_PRIVATE_FILES} 2>/dev/null
+
+ # Do not remove eval here, because the variables contain shell expansions.
+ eval chown root:root "${ROOT}"${NUT_PUBLIC_FILES} 2>/dev/null
+ eval chmod 0644 "${ROOT}"${NUT_PUBLIC_FILES} 2>/dev/null
+
+ # Do not remove eval here, because the variables contain shell expansions.
+ if use cgi; then
+ eval chown root:root "${ROOT}"${NUT_CGI_FILES} 2>/dev/null
+ eval chmod 0644 "${ROOT}"${NUT_CGI_FILES} 2>/dev/null
+ fi
+
+ warningmsg elog
+}
+
+warningmsg() {
+ msgfunc="$1"
+ [ -z "$msgfunc" ] && die "msgfunc not specified in call to warningmsg!"
+ ${msgfunc} "Please note that NUT now runs under the 'nut' user."
+ ${msgfunc} "NUT is in the uucp group for access to RS-232 UPS."
+ ${msgfunc} "However if you use a USB UPS you may need to look at the udev or"
+ ${msgfunc} "hotplug rules that are installed, and alter them suitably."
+ ${msgfunc} ''
+ ${msgfunc} "You are strongly advised to read the UPGRADING file provided by upstream."
+ ${msgfunc} ''
+ ${msgfunc} "Please note that upsdrv is NOT automatically started by upsd anymore."
+ ${msgfunc} "If you have multiple UPS units, you can use their NUT names to"
+ ${msgfunc} "have a service per UPS:"
+ ${msgfunc} "ln -s /etc/init.d/upsdrv /etc/init.d/upsdrv.\$UPSNAME"
+ ${msgfunc} ''
+ ${msgfunc} 'If you want apcupsd to power off your UPS when it'
+ ${msgfunc} 'shuts down your system in a power failure, you must'
+ ${msgfunc} 'add nut.powerfail to your shutdown runlevel:'
+ ${msgfunc} ''
+ ${msgfunc} 'rc-update add nut.powerfail shutdown'
+ ${msgfunc} ''
+
+}