summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--sys-power/nut/Manifest12
-rw-r--r--sys-power/nut/files/lighttpd_nut.conf23
-rw-r--r--sys-power/nut/files/nut-2.0.5-bcmxcp-3phase.patch91
-rwxr-xr-xsys-power/nut/files/upsd.rc635
-rwxr-xr-xsys-power/nut/files/upsdrv.rc6-r121
-rwxr-xr-xsys-power/nut/files/upsmon.rc620
-rw-r--r--sys-power/nut/files/upsstats-upsset-link-2.0.5.patch15
-rw-r--r--sys-power/nut/nut-2.0.5-r2.ebuild190
-rw-r--r--sys-power/nut/nut-2.4.1-r2.ebuild232
-rw-r--r--sys-power/nut/nut-2.4.1.ebuild216
-rw-r--r--sys-power/nut/nut-2.4.3-r1.ebuild234
-rw-r--r--sys-power/nut/nut-2.4.3.ebuild233
12 files changed, 0 insertions, 1322 deletions
diff --git a/sys-power/nut/Manifest b/sys-power/nut/Manifest
index e06374aa565f..2eb0014d2120 100644
--- a/sys-power/nut/Manifest
+++ b/sys-power/nut/Manifest
@@ -1,6 +1,4 @@
-AUX lighttpd_nut.conf 961 RMD160 636b45860713453dc88d7ed0392862735e329099 SHA1 1cde03638637f3b2e302ae939605f2f2b7f464fd SHA256 5604058313d3cfeba426c69a756944bc7cc3ddb3813db68582e69dff1a00f7cb
AUX lighttpd_nut.conf-2.2.0 971 RMD160 745f65fac2b33e0f2baef7213c2d745c4ebb3dd5 SHA1 62f0bc9d331728023382befb3fc395dc71db032d SHA256 f0b1b3e574766557dbf92704eb4cf81b166bb4db68ddecee581cb8b0b6638f65
-AUX nut-2.0.5-bcmxcp-3phase.patch 2983 RMD160 f27271648742d96952902e27b83e4b5ed39067e7 SHA1 5c87466ddfed6455989871c14d77c488a4e75a58 SHA256 1ce3938251c834e8ea31850635c085ff7f4785d268d2257f4e1c05e8732056ee
AUX nut-2.2.2-init.d-upsd 770 RMD160 339bdc9e9f338c6560155cb51986e5210693cfe2 SHA1 918b6955f2799eaedd08bf277b234c82e2b4cf7a SHA256 5cabebe42add66c88ec3f75b94faab21730c2828f7e2a390c90cc80cd765a0f6
AUX nut-2.2.2-init.d-upsdrv 978 RMD160 249292e9338ae68b956c5858db7588447c3f41d7 SHA1 753bc85f2c521074bad8a2cec206a4c8bc50f68e SHA256 19d16a28347868e380a08c1d0aed542ac7c37afaf0afe85d6e5c974796dfc138
AUX nut-2.2.2-init.d-upsmon 655 RMD160 04ba8bdc74c296f7126dcc06a748fbeac630ab64 SHA1 c69bd2d85fcf9e59d49b57fd5a3d51575bd688b0 SHA256 f8063853e446dc4012254ac6f81d4c1921f3e9f5c8dabe49bec3420bad98bc06
@@ -9,21 +7,11 @@ AUX nut-2.4.1-no-libdummy.patch 791 RMD160 2a8ed4c000b3bd2a271e1e169486a0cd1cbdb
AUX nut-2.4.3-asneeded.patch 20332 RMD160 c3486956de7e8f8a087a1f57ac2d60accfbe1864 SHA1 dbc6c905a50569f3c1a01966e9eefa2a5cbe48c1 SHA256 3ca71b9174302e7648d13bafec10c95825e4398e48bc9e5fb64b3ea2d52d8127
AUX nut-2.4.3-lowspeed-buffer-size.patch 725 RMD160 ac7a5dbe8e65dc7fe1376eb8c695a66c260be68c SHA1 d71e49841f023812bf3c5934b65dad016aaa97ef SHA256 74ed963e039413472907ebdbba07dd59ebf8e721214f32ce0fabe169597dc9b7
AUX nut.powerfail.initd 1395 RMD160 46b06189163777fc7f944efe8647b11df90f01db SHA1 a0f776ed02cf733dcdc566e58e63ccfe88352d37 SHA256 3ef933724169dbe08645fed19674a1576ced5f54a88985b5b32baf2a9c178ae7
-AUX upsd.rc6 733 RMD160 e95d9885a27059b16f17c6f124a43f158fef3b19 SHA1 7ffcd039a7a2e58f1608a7fe29898c13b3c4a762 SHA256 f78f9ef953e4f9b17f40eb36fe404118a39bb0baba9ccde0fb4ea0274440bb93
-AUX upsdrv.rc6-r1 490 RMD160 b13a0dcc1facd1d857d15838da65a5bc360daa83 SHA1 ffbcc64d07317e6a3275156bbdcbbb08497415aa SHA256 4b2f21251cdf789ebe0688ad27ad699940f5cfb0ddaa4d9c5d22f8343ccbfd84
-AUX upsmon.rc6 473 RMD160 6ad1ce54be6199d3399e77d008229acb2f02bc43 SHA1 bde917f09b74a9efc563d91b9dd74a4e8b793e3f SHA256 f338e5955c6f1e601cb0b90b95c00cbde47ef3dc56e970d8f42bb335203fbcc7
-AUX upsstats-upsset-link-2.0.5.patch 625 RMD160 69253155db06c10ea4f8c5b0dd4c66388128323b SHA1 d0158643ebe1ec828d1f479560bb14205b767668 SHA256 d7cc3c65878628e35937d29198570ea755e5798408ed531c38d2e3999c255ff4
-DIST nut-2.0.5.tar.gz 809006 RMD160 e5f90a73932e038d3dfee8cb32faf097d99a7e0b SHA1 d2c07adeac524b8463677c756a90f2f22084f35e SHA256 5e1bfecfca528104db7025050c81258ee20620df7497ab5988ad461d951c8203
DIST nut-2.2.2.tar.gz 1184406 RMD160 4dc1d2b729fc0e02c0475008c44bc62e1901f705 SHA1 f54cc909b229931fb91b4a360f0447b539d4ea6b SHA256 599d0024bcc116137a3eb65030d3dbc7132a64f30a7717f76a8254d8543422eb
DIST nut-2.4.1.tar.gz 1121152 RMD160 d046a711fb8f94b1a3652dea774d201684292272 SHA1 c8e999da718cfe14211977c19dd9b055cfc6fada SHA256 9e2441e1a7046627715cfe78e22f82f7bb05bf380735f803731b64e06bd19f3c
DIST nut-2.4.3.tar.gz 1154503 RMD160 6ec6bba67ab2caa761e7b3299e047bc49b85cebd SHA1 3a09b09c03df7e8b12f70576fd703e65d1cf7b06 SHA256 d3b701f21f1e049abb5df94ee9805fce86fe57a876c3bb41217558a846a49335
-EBUILD nut-2.0.5-r2.ebuild 5261 RMD160 b2bd160f2a5b615ad7218ea60594c52e8946ae52 SHA1 cc41c4837f1f2fbd81aad43a72e40a7166b1bd86 SHA256 e62d7f16fe85f7bbff8cb87337d0d26053a70f5fe8b3933889f1ed826e5ddf62
EBUILD nut-2.2.2.ebuild 6454 RMD160 58c441e7cdc5ad04dd084fd595973274b05d175b SHA1 4289411855d4bd03e89ad5ecbfbd7588cba93f1d SHA256 d5cddff3a82acec2314404a5d5ad24a1828a2e29dfb986fe59e4fe2e79db1a2d
EBUILD nut-2.4.1-r1.ebuild 6722 RMD160 c31099f7ca3ff141e3e713e86bf095a06d46d5d0 SHA1 4f0619d3e0c0f6c8dfb15bfaa8a07bc1d708a450 SHA256 5331b44913445c64015a737f489a5fd000be78560eb7d81fe17bf4c9b33cff4c
-EBUILD nut-2.4.1-r2.ebuild 7210 RMD160 c827186d7dd2a049d25554721b9774acaaea54bc SHA1 50bd86a634a8890d4d57f11802de2773ab8b3741 SHA256 93b5f153969389e2d03bf907570d40414f0e61793e3b711379d87dd10f6100b2
-EBUILD nut-2.4.1.ebuild 6665 RMD160 052d8f848524ef17107890722e3cd3152738458e SHA1 a76414b8c84581f391f979f139f72f97e6821ae5 SHA256 2fb392e56488f3f62bf275659459e44f6215c5e4261c003141419c6e11bee717
-EBUILD nut-2.4.3-r1.ebuild 7333 RMD160 903d89b5639ec4227157071fd0db21bf086511d2 SHA1 8fcad4adc97e5eed82bc1e85166677892c27ee05 SHA256 3d7cf1c7b9e36bcbd536d97029a8a033254d9b4bcd0f4d527ef5769b72ddc7f0
EBUILD nut-2.4.3-r2.ebuild 7377 RMD160 6fee93fc0b8f8999e32ad0b0fc61407d404ab712 SHA1 8b17220daded9026fd3d20cce93137d714625036 SHA256 f4368dab0abdd6d9716b7e78a077d024de176bb50ce5caeb3321ab776c7349da
-EBUILD nut-2.4.3.ebuild 7269 RMD160 8750f107d2a610f1eed994bf12915b240fc163ed SHA1 05feb5830c4fe50d9d7dc8c6946489c79febda16 SHA256 1052076eced0a68ea6d298f0ba49928026ee6fd77536f44b4102b1122f97a96c
MISC ChangeLog 19307 RMD160 276697aadda3b408c1e7a2a6e32d2fff4a4a2ff3 SHA1 bbb730dc3b3ceaa9436c0e34488f36aa91fb130c SHA256 93b2cf57107c14b679022be0ae6d24cab761621b32d05d932cc2acd6f03b4275
MISC metadata.xml 219 RMD160 7737543ce33cd412792e332121aa1c6ed452adfc SHA1 6c360930b80d6f4168ba1a486a25ad176505ea63 SHA256 8b2ef93d0d6f03a1ad115651dc46a7752e7775a62a32a7046c3294e50b14725b
diff --git a/sys-power/nut/files/lighttpd_nut.conf b/sys-power/nut/files/lighttpd_nut.conf
deleted file mode 100644
index 7e5d4d1843cc..000000000000
--- a/sys-power/nut/files/lighttpd_nut.conf
+++ /dev/null
@@ -1,23 +0,0 @@
-###############################################################################
-# Lighttpd configuration for using NUT under Gentoo Linux.
-# Copyright 1999-2006 Gentoo Foundation
-# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/sys-power/nut/files/lighttpd_nut.conf,v 1.1 2006/05/18 23:28:07 robbat2 Exp $
-###############################################################################
-
-# Simple copy this to /etc/lighttpd/ and include it in your lighttpd.conf.
-# It will make NUT available at http://$HOST/nut/
-
-server.modules += ("mod_cgi")
-
-# If you want to limit it to some host, uncomment the host check and modify it to your needs.
-# $HTTP["host"] == "www2.example.org" {
-alias.url += ( "/nut/" => "/usr/share/nut/" )
-$HTTP["url"] =~ "^/nut/" {
- dir-listing.activate = "disable"
- cgi.assign = ( ".cgi" => "" )
- index-file.names = ( "upsstats.cgi" )
-}
-# }
-
-# vim: set ft=conf foldmethod=marker et :
diff --git a/sys-power/nut/files/nut-2.0.5-bcmxcp-3phase.patch b/sys-power/nut/files/nut-2.0.5-bcmxcp-3phase.patch
deleted file mode 100644
index 98f023e444c0..000000000000
--- a/sys-power/nut/files/nut-2.0.5-bcmxcp-3phase.patch
+++ /dev/null
@@ -1,91 +0,0 @@
-Signed-off-by: Kjell Claesson <kjell.claesson@epost.tidanet.se>
-Signed-off-by: Robin H. Johnson <robbat2@gentoo.org>
-Date: Sun, 25 Feb 2007 11:08:33 +0100
-
-Patch from upstream developer (Kjell) for bcmxcp on Compaq and HP
-hardware, due to 3-phase configuration bug.
-
---- nut-2.0.5.orig/drivers/bcmxcp.c 2006-12-14 20:06:19.000000000 +0100
-+++ nut-2.0.5/drivers/bcmxcp.c 2007-01-22 22:55:41.000000000 +0100
-@@ -57,6 +57,7 @@
- char *ABMStatus[4] = {"Charging", "Discharging", "Floating", "Resting"};
- unsigned char AUTHOR[4] = {0xCF, 0x69, 0xE8, 0xD5}; /* Autorisation command */
- int nphases = 0;
-+char *cpu_name[] = {"Cont:", "Inve:", "Rect:", "Netw:", "Disp:"};
-
- /* get_word funktion from nut driver metasys.c */
- int get_word(const unsigned char *buffer) /* return an integer reading a word in the supplied buffer */
-@@ -727,23 +728,11 @@
- unsigned char answer[256];
- char *pTmp, sValue[17];
- int iRating = 0, iIndex = 0, res, len;
-- int voltage = 0;
-+ int voltage = 0, ncpu = 0, buf;
-
- /* Set driver version info */
- dstate_setinfo("driver.version.internal", "%s", DRV_VERSION);
-
-- /* Get information on Phases from UPS */
-- res = command_read_sequence(PW_UPS_TOP_DATA_REQ, answer);
-- if (res <= 0)
-- fatal_with_errno("Could not communicate with the ups");
--
-- nphases = (answer[0] & 0x0F) +1;
-- dstate_setinfo("input.phases", "%d", nphases);
--
--
-- /* Init BCM/XCP <-> NUT meter map */
-- init_meter_map();
--
- /* Init BCM/XCP alarm descriptions */
- init_alarm_map();
-
-@@ -761,15 +750,26 @@
- /* Get number of CPU's in ID block */
- len = answer[iIndex++];
-
-+ buf = len * 11;
-+ pTmp = xmalloc(buf+1);
-+
-+ pTmp[0] = 0;
- /* If there is one or more CPU number, get it */
- if (len > 0) {
- do {
-- /* Get the ups firmware. The major number is in the last byte, the minor is in the first */
-- dstate_setinfo("ups.firmware", "%02x.%02x", (unsigned char)answer[iIndex+1],
-- (unsigned char)answer[iIndex]);
-+ if ((answer[iIndex] != 0x00) || (answer[iIndex+1] != 0x00)) {
-+ /* Get the ups firmware. The major number is in the last byte, the minor is in the first */
-+ snprintfcat(pTmp, buf+1, "%s%02x.%02x ", cpu_name[ncpu], answer[iIndex+1], answer[iIndex]);
-+ }
- iIndex += 2;
- len--;
-- } while ((strcmp("00.00", dstate_getinfo("ups.firmware")) == 0) && len > 0);
-+ ncpu++;
-+
-+ } while ((len > 0) && (ncpu <= 5));
-+
-+ dstate_setinfo("ups.firmware", "%s", pTmp);
-+
-+ free(pTmp);
-
- /* Increment index to point at end of CPU bytes. */
- iIndex += len * 2;
-@@ -786,8 +786,15 @@
- }
- dstate_setinfo("ups.power.nominal", "%d", iRating);
-
-- /* Skip UPS' number of phases and phase angle, as NUT do not care */
-- iIndex += 2;
-+ /* Get information on Phases from UPS */
-+ nphases = (answer[iIndex++]);
-+ dstate_setinfo("output.phases", "%d", nphases);
-+
-+ /* Init BCM/XCP <-> NUT meter map */
-+ init_meter_map();
-+
-+ /* Skip UPS' phase angle, as NUT do not care */
-+ iIndex += 1;
-
- /* Get length of UPS description */
- len = answer[iIndex++];
diff --git a/sys-power/nut/files/upsd.rc6 b/sys-power/nut/files/upsd.rc6
deleted file mode 100755
index 0cb34f620878..000000000000
--- a/sys-power/nut/files/upsd.rc6
+++ /dev/null
@@ -1,35 +0,0 @@
-#!/sbin/runscript
-# Copyright 1999-2004 Gentoo Foundation
-# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/sys-power/nut/files/upsd.rc6,v 1.3 2007/10/09 00:42:45 robbat2 Exp $
-
-opts="reload"
-pidfile=/var/lib/nut/upsd.pid
-
-depend() {
- need net upsdrv
- before upsmon
-}
-
-start() {
- ebegin "Starting upsd"
- # clean up first
- pkill -u root -x upsd
- sleep 1s
- rm -f ${pidfile}
- # now start up
- start-stop-daemon --start --quiet --exec /usr/sbin/upsd
- eend $?
-}
-
-stop() {
- ebegin "Stopping upsd"
- start-stop-daemon --stop --quiet --pidfile ${pidfile}
- eend $?
-}
-
-reload() {
- ebegin "Reloading upsd"
- start-stop-daemon --stop --signal HUP --oknodo --quiet --pidfile ${pidfile}
- eend $?
-}
diff --git a/sys-power/nut/files/upsdrv.rc6-r1 b/sys-power/nut/files/upsdrv.rc6-r1
deleted file mode 100755
index fef39d17ac91..000000000000
--- a/sys-power/nut/files/upsdrv.rc6-r1
+++ /dev/null
@@ -1,21 +0,0 @@
-#!/sbin/runscript
-# Copyright 1999-2004 Gentoo Foundation
-# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/sys-power/nut/files/upsdrv.rc6-r1,v 1.1 2006/05/15 23:43:08 robbat2 Exp $
-
-depend() {
- need net
- before upsd
-}
-
-start() {
- ebegin "Starting UPS drivers"
- /usr/sbin/upsdrvctl start
- eend $? "Failed to start UPS drivers!"
-}
-
-stop() {
- ebegin "Stopping UPS drivers"
- /usr/sbin/upsdrvctl stop
- eend $? "Failed to stop UPS drivers!"
-}
diff --git a/sys-power/nut/files/upsmon.rc6 b/sys-power/nut/files/upsmon.rc6
deleted file mode 100755
index ba488c7d8ce5..000000000000
--- a/sys-power/nut/files/upsmon.rc6
+++ /dev/null
@@ -1,20 +0,0 @@
-#!/sbin/runscript
-# Copyright 1999-2004 Gentoo Foundation
-# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/sys-power/nut/files/upsmon.rc6,v 1.1 2006/05/15 23:43:08 robbat2 Exp $
-
-depend() {
- need net
-}
-
-start() {
- ebegin "Starting upsmon"
- start-stop-daemon --start --quiet --exec /usr/sbin/upsmon
- eend $?
-}
-
-stop() {
- ebegin "Stopping upsmon"
- start-stop-daemon --stop --quiet --pidfile /var/run/upsmon.pid
- eend $?
-}
diff --git a/sys-power/nut/files/upsstats-upsset-link-2.0.5.patch b/sys-power/nut/files/upsstats-upsset-link-2.0.5.patch
deleted file mode 100644
index db48b1aa3eae..000000000000
--- a/sys-power/nut/files/upsstats-upsset-link-2.0.5.patch
+++ /dev/null
@@ -1,15 +0,0 @@
-Signed-off-by: Robin H. Johnson <robbat2@gentoo.org>
-Date: Sat, 24 Feb 2007 18:43:09 -0800
-
-Include a link to the upsset page from the stats page.
-
---- nut-2.0.5.orig/conf/upsstats.html 2006-11-07 18:08:45.000000000 -0800
-+++ nut-2.0.5/conf/upsstats.html 2007-02-24 18:41:06.000000000 -0800
-@@ -177,6 +177,7 @@
-
- </td></tr>
- </table>
-+<p style="text-align: center"><a href="upsset.cgi">Settings &amp; Commands</a></p>
-
- <hr /><div><small>
- <a href="http://jigsaw.w3.org/css-validator/check/referer"><img style="float:right" src="http://jigsaw.w3.org/css-validator/images/vcss" alt="Valid CSS!" height="31" width="88"/></a>
diff --git a/sys-power/nut/nut-2.0.5-r2.ebuild b/sys-power/nut/nut-2.0.5-r2.ebuild
deleted file mode 100644
index 00fd903ba582..000000000000
--- a/sys-power/nut/nut-2.0.5-r2.ebuild
+++ /dev/null
@@ -1,190 +0,0 @@
-# Copyright 1999-2009 Gentoo Foundation
-# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/sys-power/nut/nut-2.0.5-r2.ebuild,v 1.12 2009/05/16 08:45:32 robbat2 Exp $
-
-inherit eutils fixheadtails autotools
-
-MY_P="${P/_/-}"
-
-DESCRIPTION="Network-UPS Tools"
-HOMEPAGE="http://www.networkupstools.org/"
-# Nut mirrors are presently broken
-#SRC_URI="mirror://nut/source/${PV%.*}/${MY_P}.tar.gz"
-SRC_URI="http://www.networkupstools.org/source/${PV%.*}/${MY_P}.tar.gz"
-
-S="${WORKDIR}/${MY_P}"
-
-LICENSE="GPL-2"
-SLOT="0"
-KEYWORDS="~alpha amd64 ppc ppc64 sparc x86 ~x86-fbsd"
-IUSE="cgi snmp usb ssl"
-
-RDEPEND="cgi? ( >=media-libs/gd-2 )
- snmp? ( net-analyzer/net-snmp )
- usb? ( =virtual/libusb-0* )
- ssl? ( dev-libs/openssl )
- !<sys-fs/udev-104"
-DEPEND="$RDEPEND
- >=sys-apps/sed-4
- >=sys-devel/autoconf-2.58"
-
-# public files should be 644 root:root
-NUT_PUBLIC_FILES="/etc/nut/{{hosts,upsset,ups,upssched}.conf,upsstats{,-single}.html}"
-# private files should be 640 root:nut - readable by nut, writeable by root,
-NUT_PRIVATE_FILES="/etc/nut/{upsd.conf,upsd.users,upsmon.conf}"
-
-pkg_setup() {
- enewgroup nut 84
- enewuser nut 84 -1 /var/state/nut nut,uucp
- # As of udev-104, NUT must be in uucp and NOT in tty.
- gpasswd -d nut tty
- gpasswd -a nut uucp
- # in some cases on old systems it wasn't in the nut group either!
- gpasswd -a nut nut
- warningmsg ewarn
-}
-
-src_unpack() {
- unpack ${A}
-
- EPATCH_OPTS="-p1 -d ${S}" epatch ${FILESDIR}/upsstats-upsset-link-2.0.5.patch
- EPATCH_OPTS="-p1 -d ${S}" epatch ${FILESDIR}/nut-2.0.5-bcmxcp-3phase.patch
-
- cd "${S}"
-
- sed -e "s/install: install-dirs/install: install-dirs install-conf/" \
- -i Makefile.in || die "sed failed"
-
- ht_fix_file configure.in
-
- sed -e "s:GD_LIBS.*=.*-L/usr/X11R6/lib \(.*\) -lXpm -lX11:GD_LIBS=\"\1:" \
- -i configure.in || die "sed failed"
-
- ebegin "Recreating configure"
- WANT_AUTOCONF=2.5 eautoconf || die "autoconf failed"
- eend $?
-}
-
-src_compile() {
- local myconf
-
- if [ -n "${NUT_DRIVERS}" ]; then
- myconf="${myconf} --with-drivers=${NUT_DRIVERS// /,}"
- fi
-
- econf \
- --with-user=nut \
- --with-group=nut \
- --with-drvpath=/lib/nut \
- --sysconfdir=/etc/nut \
- --with-logfacility=LOG_DAEMON \
- --with-statepath=/var/lib/nut \
- $(use_with ssl) \
- $(use_with cgi) \
- $(use_with cgi cgipath /usr/share/nut) \
- ${myconf} || die "econf failed"
-
- emake || die "compile problem"
-
- if use snmp; then
- emake snmp || die "snmp compile problem"
- fi
-
- if use usb; then
- emake usb || die "usb compile problem"
- fi
-
- if use cgi; then
- emake cgi || die "cgi compile problem"
- fi
-}
-
-src_install() {
- make DESTDIR="${D}" install install-lib || die "make install failed"
-
- dodir /sbin
- dosym /lib/nut/upsdrvctl /sbin/upsdrvctl
- # This needs to exist for the scripts
- dosym /lib/nut/upsdrvctl /usr/sbin/upsdrvctl
-
- if use snmp; then
- make DESTDIR="${D}" install-snmp || die "make install-snmp failed"
- fi
-
- if use usb; then
- make DESTDIR="${D}" install-usb || die "make install-usb failed"
- fi
-
- if use cgi; then
- make DESTDIR="${D}" install-cgi || die "make install-cgi failed"
- make DESTDIR="${D}" install-cgi-conf || die "make install-cgi-conf failed"
- einfo "CGI monitoring scripts are installed in /usr/share/nut."
- einfo "copy them to your web server's ScriptPath to activate."
- einfo "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 ChangeLog CREDITS INSTALL MAINTAINERS NEWS README UPGRADING \
- docs/{FAQ,*.txt}
-
- newdoc lib/README README.lib
-
- dodoc "${FILESDIR}"/lighttpd_nut.conf
-
- docinto cables
- dodoc docs/cables/*
-
- newinitd "${FILESDIR}"/upsd.rc6 upsd
- newinitd "${FILESDIR}"/upsdrv.rc6-r1 upsdrv
- newinitd "${FILESDIR}"/upsmon.rc6 upsmon
-
- # This sets up permissions for nut to access a UPS
- insinto /etc/udev/rules.d/
- newins scripts/hotplug-ng/nut-usbups.rules 70-nut-usbups.rules
-
- keepdir /var/lib/nut
-
- fperms 0700 /var/lib/nut
- fowners nut:nut /var/lib/nut
-
- eval fperms 0640 ${NUT_PRIVATE_FILES}
- eval fowners root:nut ${NUT_PRIVATE_FILES}
-
- eval fperms 0644 ${NUT_PUBLIC_FILES}
- eval fowners root:root ${NUT_PUBLIC_FILES}
-
- # this is installed for 2.4 and fbsd guys
- if ! has_version sys-fs/udev; then
- insinto /etc/hotplug/usb
- insopts -m 755
- doins scripts/hotplug-ng/nut-usbups.hotplug
- fi
-}
-
-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
-
- eval chown root:nut "${ROOT}"${NUT_PRIVATE_FILES} 2>/dev/null
- eval chmod 0640 "${ROOT}"${NUT_PRIVATE_FILES} 2>/dev/null
-
- eval chown root:root "${ROOT}"${NUT_PUBLIC_FILES} 2>/dev/null
- eval chmod 0644 "${ROOT}"${NUT_PUBLIC_FILES} 2>/dev/null
-
- 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."
-}
diff --git a/sys-power/nut/nut-2.4.1-r2.ebuild b/sys-power/nut/nut-2.4.1-r2.ebuild
deleted file mode 100644
index 7605febbd0e0..000000000000
--- a/sys-power/nut/nut-2.4.1-r2.ebuild
+++ /dev/null
@@ -1,232 +0,0 @@
-# Copyright 1999-2010 Gentoo Foundation
-# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/sys-power/nut/nut-2.4.1-r2.ebuild,v 1.3 2010/06/22 20:07:21 arfrever Exp $
-
-EAPI="2"
-
-inherit eutils fixheadtails autotools bash-completion
-
-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"
-
-S="${WORKDIR}/${MY_P}"
-
-LICENSE="GPL-2"
-SLOT="0"
-KEYWORDS="~alpha ~amd64 ~ppc ~sparc ~x86 ~x86-fbsd"
-IUSE="cgi snmp usb ssl hal xml"
-
-RDEPEND="cgi? ( >=media-libs/gd-2[png] )
- snmp? ( net-analyzer/net-snmp )
- usb? ( =virtual/libusb-0* )
- hal? ( >=sys-apps/hal-0.5.11 )
- ssl? ( dev-libs/openssl )
- xml? ( >=net-libs/neon-0.25.0 )
- >=sys-fs/udev-114"
-DEPEND="$RDEPEND
- >=sys-apps/sed-4
- >=sys-devel/autoconf-2.58
- dev-util/pkgconfig"
-
-# 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
- use hal && gpasswd -a haldaemon nut 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}"/${PN}-2.4.1-no-libdummy.patch
-
- sed -e "s:GD_LIBS.*=.*-L/usr/X11R6/lib \(.*\) -lXpm -lX11:GD_LIBS=\"\1:" \
- -i configure.in || die "sed failed"
-
- sed -e "s:52.nut-usbups.rules:70-nut-usbups.rules:" \
- -i scripts/udev/Makefile.am || die "sed failed"
-
- rm -f ltmain.sh m4/lt* m4/libtool.m4
-
- WANT_AUTOCONF=2.5 eautoreconf || die "autoconf failed"
-}
-
-src_configure() {
- local myconf
-
- if [ -n "${NUT_DRIVERS}" ]; then
- myconf="${myconf} --with-drivers=${NUT_DRIVERS// /,}"
- fi
-
- econf \
- --with-user=nut \
- --with-group=nut \
- --with-drvpath=/lib/nut \
- --sysconfdir=/etc/nut \
- --with-logfacility=LOG_DAEMON \
- --with-statepath=/var/lib/nut \
- --with-htmlpath=/usr/share/nut/html \
- --datarootdir=/usr/share/nut \
- --datadir=/usr/share/nut \
- --with-dev \
- $(use_with xml neonxml) \
- $(use_with hal) \
- $(use_with ssl) \
- $(use_with usb) \
- $(use_with snmp) \
- $(use_with cgi) \
- $(use_with cgi cgipath /usr/share/nut/cgi) \
- ${myconf} || die "econf failed"
-
-}
-
-src_install() {
-
- emake DESTDIR="${D}" install || die "make install failed"
-
- dodir /sbin
- dosym /lib/nut/upsdrvctl /sbin/upsdrvctl
- # This needs to exist for the scripts
- dosym /lib/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 ChangeLog INSTALL MAINTAINERS NEWS README UPGRADING \
- docs/{FAQ,*.txt} || 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.2.2-init.d-upsd upsd \
- || die "newinitd failed"
- newinitd "${FILESDIR}"/nut-2.2.2-init.d-upsdrv upsdrv \
- || die "newinitd failed"
- newinitd "${FILESDIR}"/nut-2.2.2-init.d-upsmon upsmon \
- || die "newinitd failed"
- newinitd "${FILESDIR}"/nut.powerfail.initd nut.powerfail \
- || die "newinitd failed"
-
- # This sets up permissions for nut to access a UPS
- insinto /etc/udev/rules.d/
- newins scripts/udev/nut-usbups.rules 70-nut-usbups.rules
-
- 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 sys-fs/udev; then
- einfo "Installing non-udev hotplug support"
- insinto /etc/hotplug/usb
- insopts -m 755
- doins scripts/hotplug/nut-usbups.hotplug
- fi
-
- if use hal; then
- einfo "Installing HAL support"
- insinto /usr/share/hal/fdi/information/20thirdparty/
- doins scripts/hal/20-ups-nut-device.fdi
- insinto /usr/libexec
- insopts -m 755
- doins drivers/hald-addon-*
- rm "${D}"/lib/nut/hald-addon-*
- fi
-
- dobashcompletion "${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} "If you use hald, you may be able to skip the normal init scripts."
- ${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} ''
-
-}
diff --git a/sys-power/nut/nut-2.4.1.ebuild b/sys-power/nut/nut-2.4.1.ebuild
deleted file mode 100644
index 956e03bfb61e..000000000000
--- a/sys-power/nut/nut-2.4.1.ebuild
+++ /dev/null
@@ -1,216 +0,0 @@
-# Copyright 1999-2009 Gentoo Foundation
-# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/sys-power/nut/nut-2.4.1.ebuild,v 1.4 2010/06/22 20:07:21 arfrever Exp $
-
-EAPI="2"
-
-inherit eutils fixheadtails autotools bash-completion
-
-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"
-
-S="${WORKDIR}/${MY_P}"
-
-LICENSE="GPL-2"
-SLOT="0"
-KEYWORDS="~alpha ~amd64 ~ppc ~sparc ~x86 ~x86-fbsd"
-IUSE="cgi snmp usb ssl hal xml"
-
-RDEPEND="cgi? ( >=media-libs/gd-2[png] )
- snmp? ( net-analyzer/net-snmp )
- usb? ( =virtual/libusb-0* )
- hal? ( >=sys-apps/hal-0.5.11 )
- ssl? ( dev-libs/openssl )
- xml? ( >=net-libs/neon-0.25.0 )
- >=sys-fs/udev-114"
-DEPEND="$RDEPEND
- >=sys-apps/sed-4
- >=sys-devel/autoconf-2.58"
-
-# 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
- use hal && gpasswd -a haldaemon nut 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}"/${PN}-2.4.1-no-libdummy.patch
-
- sed -e "s:GD_LIBS.*=.*-L/usr/X11R6/lib \(.*\) -lXpm -lX11:GD_LIBS=\"\1:" \
- -i configure.in || die "sed failed"
-
- sed -e "s:52.nut-usbups.rules:70-nut-usbups.rules:" \
- -i scripts/udev/Makefile.am || die "sed failed"
-
- WANT_AUTOCONF=2.5 eautoreconf || die "autoconf failed"
-}
-
-src_configure() {
- local myconf
-
- if [ -n "${NUT_DRIVERS}" ]; then
- myconf="${myconf} --with-drivers=${NUT_DRIVERS// /,}"
- fi
-
- econf \
- --with-user=nut \
- --with-group=nut \
- --with-drvpath=/lib/nut \
- --sysconfdir=/etc/nut \
- --with-logfacility=LOG_DAEMON \
- --with-statepath=/var/lib/nut \
- --with-htmlpath=/usr/share/nut/html \
- --datarootdir=/usr/share/nut \
- --datadir=/usr/share/nut \
- --with-dev \
- $(use_with xml neonxml) \
- $(use_with hal) \
- $(use_with ssl) \
- $(use_with usb) \
- $(use_with snmp) \
- $(use_with cgi) \
- $(use_with cgi cgipath /usr/share/nut/cgi) \
- ${myconf} || die "econf failed"
-
-}
-
-src_install() {
-
- emake DESTDIR="${D}" install || die "make install failed"
-
- dodir /sbin
- dosym /lib/nut/upsdrvctl /sbin/upsdrvctl
- # This needs to exist for the scripts
- dosym /lib/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 ChangeLog INSTALL MAINTAINERS NEWS README UPGRADING \
- docs/{FAQ,*.txt} || 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.2.2-init.d-upsd upsd
- newinitd "${FILESDIR}"/nut-2.2.2-init.d-upsdrv upsdrv
- newinitd "${FILESDIR}"/nut-2.2.2-init.d-upsmon upsmon
-
- # This sets up permissions for nut to access a UPS
- insinto /etc/udev/rules.d/
- newins scripts/udev/nut-usbups.rules 70-nut-usbups.rules
-
- 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 sys-fs/udev; then
- einfo "Installing non-udev hotplug support"
- insinto /etc/hotplug/usb
- insopts -m 755
- doins scripts/hotplug/nut-usbups.hotplug
- fi
-
- if use hal; then
- einfo "Installing HAL support"
- insinto /usr/share/hal/fdi/information/20thirdparty/
- doins scripts/hal/20-ups-nut-device.fdi
- insinto /usr/libexec
- insopts -m 755
- doins drivers/hald-addon-*
- rm "${D}"/lib/nut/hald-addon-*
- fi
-
- dobashcompletion "${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."
- echo
- ${msgfunc} "If you use hald, you may be able to skip the normal init scripts."
- echo
- ${msgfunc} "You are strongly advised to read the UPGRADING file provided by upstream."
- echo
- ${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"
-}
diff --git a/sys-power/nut/nut-2.4.3-r1.ebuild b/sys-power/nut/nut-2.4.3-r1.ebuild
deleted file mode 100644
index 4b9763a26d53..000000000000
--- a/sys-power/nut/nut-2.4.3-r1.ebuild
+++ /dev/null
@@ -1,234 +0,0 @@
-# Copyright 1999-2010 Gentoo Foundation
-# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/sys-power/nut/nut-2.4.3-r1.ebuild,v 1.3 2010/06/22 20:07:21 arfrever Exp $
-
-EAPI="2"
-
-inherit eutils fixheadtails autotools bash-completion
-
-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"
-
-S="${WORKDIR}/${MY_P}"
-
-LICENSE="GPL-2"
-SLOT="0"
-KEYWORDS="~alpha ~amd64 ~ppc ~sparc ~x86 ~x86-fbsd"
-IUSE="cgi snmp usb ssl hal xml"
-
-RDEPEND="cgi? ( >=media-libs/gd-2[png] )
- snmp? ( net-analyzer/net-snmp )
- usb? ( =virtual/libusb-0* )
- hal? ( >=sys-apps/hal-0.5.11 )
- ssl? ( dev-libs/openssl )
- xml? ( >=net-libs/neon-0.25.0 )
- >=sys-fs/udev-114"
-DEPEND="$RDEPEND
- >=sys-apps/sed-4
- >=sys-devel/autoconf-2.58
- dev-util/pkgconfig"
-
-# 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
- use hal && gpasswd -a haldaemon nut 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}"/${PN}-2.4.1-no-libdummy.patch
- epatch "${FILESDIR}"/${PN}-2.4.3-lowspeed-buffer-size.patch
-
- sed -e "s:GD_LIBS.*=.*-L/usr/X11R6/lib \(.*\) -lXpm -lX11:GD_LIBS=\"\1:" \
- -i configure.in || die "sed failed"
-
- sed -e "s:52.nut-usbups.rules:70-nut-usbups.rules:" \
- -i scripts/udev/Makefile.am || die "sed failed"
-
- rm -f ltmain.sh m4/lt* m4/libtool.m4
-
- WANT_AUTOCONF=2.5 eautoreconf || die "autoconf failed"
-}
-
-src_configure() {
- local myconf
-
- if [ -n "${NUT_DRIVERS}" ]; then
- myconf="${myconf} --with-drivers=${NUT_DRIVERS// /,}"
- fi
-
- econf \
- --with-user=nut \
- --with-group=nut \
- --with-drvpath=/lib/nut \
- --sysconfdir=/etc/nut \
- --with-logfacility=LOG_DAEMON \
- --with-statepath=/var/lib/nut \
- --with-htmlpath=/usr/share/nut/html \
- --datarootdir=/usr/share/nut \
- --datadir=/usr/share/nut \
- --with-dev \
- $(use_with xml neon) \
- $(use_with hal) \
- $(use_with ssl) \
- $(use_with usb) \
- $(use_with snmp) \
- $(use_with cgi) \
- $(use_with cgi cgipath /usr/share/nut/cgi) \
- ${myconf} || die "econf failed"
-
-}
-
-src_install() {
-
- emake DESTDIR="${D}" install || die "make install failed"
-
- dodir /sbin
- dosym /lib/nut/upsdrvctl /sbin/upsdrvctl
- # This needs to exist for the scripts
- dosym /lib/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 ChangeLog INSTALL MAINTAINERS NEWS README UPGRADING \
- docs/{FAQ,*.txt} || 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.2.2-init.d-upsd upsd \
- || die "newinitd failed"
- newinitd "${FILESDIR}"/nut-2.2.2-init.d-upsdrv upsdrv \
- || die "newinitd failed"
- newinitd "${FILESDIR}"/nut-2.2.2-init.d-upsmon upsmon \
- || die "newinitd failed"
- newinitd "${FILESDIR}"/nut.powerfail.initd nut.powerfail \
- || die "newinitd failed"
-
- # This sets up permissions for nut to access a UPS
- insinto /etc/udev/rules.d/
- newins scripts/udev/nut-usbups.rules 70-nut-usbups.rules
-
- 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 sys-fs/udev; then
- einfo "Installing non-udev hotplug support"
- insinto /etc/hotplug/usb
- insopts -m 755
- doins scripts/hotplug/nut-usbups.hotplug
- fi
-
- if use hal; then
- einfo "Installing HAL support"
- insinto /usr/share/hal/fdi/information/20thirdparty/
- doins scripts/hal/20-ups-nut-device.fdi
- insinto /usr/libexec
- insopts -m 755
- doins drivers/hald-addon-*
- rm "${D}"/lib/nut/hald-addon-*
- fi
-
- dobashcompletion "${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} "If you use hald, you may be able to skip the normal init scripts."
- ${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} ''
-
-}
diff --git a/sys-power/nut/nut-2.4.3.ebuild b/sys-power/nut/nut-2.4.3.ebuild
deleted file mode 100644
index 93279b0f10a2..000000000000
--- a/sys-power/nut/nut-2.4.3.ebuild
+++ /dev/null
@@ -1,233 +0,0 @@
-# Copyright 1999-2010 Gentoo Foundation
-# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/sys-power/nut/nut-2.4.3.ebuild,v 1.3 2010/06/22 20:07:21 arfrever Exp $
-
-EAPI="2"
-
-inherit eutils fixheadtails autotools bash-completion
-
-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"
-
-S="${WORKDIR}/${MY_P}"
-
-LICENSE="GPL-2"
-SLOT="0"
-KEYWORDS="~alpha ~amd64 ~ppc ~sparc ~x86 ~x86-fbsd"
-IUSE="cgi snmp usb ssl hal xml"
-
-RDEPEND="cgi? ( >=media-libs/gd-2[png] )
- snmp? ( net-analyzer/net-snmp )
- usb? ( =virtual/libusb-0* )
- hal? ( >=sys-apps/hal-0.5.11 )
- ssl? ( dev-libs/openssl )
- xml? ( >=net-libs/neon-0.25.0 )
- >=sys-fs/udev-114"
-DEPEND="$RDEPEND
- >=sys-apps/sed-4
- >=sys-devel/autoconf-2.58
- dev-util/pkgconfig"
-
-# 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
- use hal && gpasswd -a haldaemon nut 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}"/${PN}-2.4.1-no-libdummy.patch
-
- sed -e "s:GD_LIBS.*=.*-L/usr/X11R6/lib \(.*\) -lXpm -lX11:GD_LIBS=\"\1:" \
- -i configure.in || die "sed failed"
-
- sed -e "s:52.nut-usbups.rules:70-nut-usbups.rules:" \
- -i scripts/udev/Makefile.am || die "sed failed"
-
- rm -f ltmain.sh m4/lt* m4/libtool.m4
-
- WANT_AUTOCONF=2.5 eautoreconf || die "autoconf failed"
-}
-
-src_configure() {
- local myconf
-
- if [ -n "${NUT_DRIVERS}" ]; then
- myconf="${myconf} --with-drivers=${NUT_DRIVERS// /,}"
- fi
-
- econf \
- --with-user=nut \
- --with-group=nut \
- --with-drvpath=/lib/nut \
- --sysconfdir=/etc/nut \
- --with-logfacility=LOG_DAEMON \
- --with-statepath=/var/lib/nut \
- --with-htmlpath=/usr/share/nut/html \
- --datarootdir=/usr/share/nut \
- --datadir=/usr/share/nut \
- --with-dev \
- $(use_with xml neon) \
- $(use_with hal) \
- $(use_with ssl) \
- $(use_with usb) \
- $(use_with snmp) \
- $(use_with cgi) \
- $(use_with cgi cgipath /usr/share/nut/cgi) \
- ${myconf} || die "econf failed"
-
-}
-
-src_install() {
-
- emake DESTDIR="${D}" install || die "make install failed"
-
- dodir /sbin
- dosym /lib/nut/upsdrvctl /sbin/upsdrvctl
- # This needs to exist for the scripts
- dosym /lib/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 ChangeLog INSTALL MAINTAINERS NEWS README UPGRADING \
- docs/{FAQ,*.txt} || 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.2.2-init.d-upsd upsd \
- || die "newinitd failed"
- newinitd "${FILESDIR}"/nut-2.2.2-init.d-upsdrv upsdrv \
- || die "newinitd failed"
- newinitd "${FILESDIR}"/nut-2.2.2-init.d-upsmon upsmon \
- || die "newinitd failed"
- newinitd "${FILESDIR}"/nut.powerfail.initd nut.powerfail \
- || die "newinitd failed"
-
- # This sets up permissions for nut to access a UPS
- insinto /etc/udev/rules.d/
- newins scripts/udev/nut-usbups.rules 70-nut-usbups.rules
-
- 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 sys-fs/udev; then
- einfo "Installing non-udev hotplug support"
- insinto /etc/hotplug/usb
- insopts -m 755
- doins scripts/hotplug/nut-usbups.hotplug
- fi
-
- if use hal; then
- einfo "Installing HAL support"
- insinto /usr/share/hal/fdi/information/20thirdparty/
- doins scripts/hal/20-ups-nut-device.fdi
- insinto /usr/libexec
- insopts -m 755
- doins drivers/hald-addon-*
- rm "${D}"/lib/nut/hald-addon-*
- fi
-
- dobashcompletion "${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} "If you use hald, you may be able to skip the normal init scripts."
- ${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} ''
-
-}