summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSamuli Suominen <ssuominen@gentoo.org>2011-03-13 21:09:30 +0000
committerSamuli Suominen <ssuominen@gentoo.org>2011-03-13 21:09:30 +0000
commita4b3a8d2e92335d39648666cdbe959875cec3d79 (patch)
treed866272d9dfc13c8245c3c08d11f98b2d5a74af3 /sys-power
parentAdded required davfs2 group. Fix by Urs Joss (bug #274312) (diff)
downloadhistorical-a4b3a8d2e92335d39648666cdbe959875cec3d79.tar.gz
historical-a4b3a8d2e92335d39648666cdbe959875cec3d79.tar.bz2
historical-a4b3a8d2e92335d39648666cdbe959875cec3d79.zip
Version bump wrt #353090. Fix multilib install wrt #338096.
Package-Manager: portage-2.2.0_alpha26/cvs/Linux x86_64
Diffstat (limited to 'sys-power')
-rw-r--r--sys-power/nut/ChangeLog7
-rw-r--r--sys-power/nut/Manifest4
-rw-r--r--sys-power/nut/nut-2.6.0.ebuild218
3 files changed, 227 insertions, 2 deletions
diff --git a/sys-power/nut/ChangeLog b/sys-power/nut/ChangeLog
index 095064c4e644..6e8433aa4b46 100644
--- a/sys-power/nut/ChangeLog
+++ b/sys-power/nut/ChangeLog
@@ -1,6 +1,11 @@
# ChangeLog for sys-power/nut
# Copyright 1999-2011 Gentoo Foundation; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo-x86/sys-power/nut/ChangeLog,v 1.84 2011/02/25 08:44:44 xarthisius Exp $
+# $Header: /var/cvsroot/gentoo-x86/sys-power/nut/ChangeLog,v 1.85 2011/03/13 21:09:30 ssuominen Exp $
+
+*nut-2.6.0 (13 Mar 2011)
+
+ 13 Mar 2011; Samuli Suominen <ssuominen@gentoo.org> +nut-2.6.0.ebuild:
+ Version bump wrt #353090. Fix multilib install wrt #338096.
25 Feb 2011; Kacper Kowalik <xarthisius@gentoo.org> nut-2.4.3-r2.ebuild:
ppc/ppc64 stable wrt #321493
diff --git a/sys-power/nut/Manifest b/sys-power/nut/Manifest
index 98b491f13935..e8c71b053ce3 100644
--- a/sys-power/nut/Manifest
+++ b/sys-power/nut/Manifest
@@ -7,6 +7,8 @@ AUX nut-2.4.3-asneeded.patch 20332 RMD160 c3486956de7e8f8a087a1f57ac2d60accfbe18
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
DIST nut-2.4.3.tar.gz 1154503 RMD160 6ec6bba67ab2caa761e7b3299e047bc49b85cebd SHA1 3a09b09c03df7e8b12f70576fd703e65d1cf7b06 SHA256 d3b701f21f1e049abb5df94ee9805fce86fe57a876c3bb41217558a846a49335
+DIST nut-2.6.0.tar.gz 1703273 RMD160 d42ef82eec3ee40fa841d92bf400c7f76eb9cdfe SHA1 4ab7b220f50a088a65e59831c217a7be714a198c SHA256 febaa230b6b5f0ad27d780851047527d36c8c7a34e557b3832d6d55174d7a0d5
EBUILD nut-2.4.3-r2.ebuild 7385 RMD160 ebb38dad51b4449bd7254273b0bbd13c06d73b4f SHA1 f3775d5563f92b1ca2299a7f07ceb54b8042b02f SHA256 e0005b3dd48c626a704bf6573996f0391509f2b408cfb9a5af9b510ec28ac94b
-MISC ChangeLog 19417 RMD160 6a939a8cee1296a40b4f3a6124ee941e945fc01c SHA1 38eade266dcd4dd962d1c1797c9bce34d846eced SHA256 c3bc8f1ca36ca6340ef97258c9cc6a502e3ace535cde9492fd03e0c8ae15c9b8
+EBUILD nut-2.6.0.ebuild 6900 RMD160 6be5b495e2a7ad0bb89f1e2ef36cd6e5e20b3931 SHA1 3e7b0db1fad506f67dcbc67f39ac053c4245aa88 SHA256 7ae64d0dde9179a142f1d099103b6d96d80a2fb7a910e027ee67ca52d6ca3776
+MISC ChangeLog 19578 RMD160 7217f89d3ece85133f0b042b36530ef86b33c4bf SHA1 3fc5375d0d74a2c74142115b255e83e60f4fa107 SHA256 ab7e3a7bb52e15c1710323a90e5d7054a25b3de1c783bc25ae87de57f1e0de68
MISC metadata.xml 219 RMD160 7737543ce33cd412792e332121aa1c6ed452adfc SHA1 6c360930b80d6f4168ba1a486a25ad176505ea63 SHA256 8b2ef93d0d6f03a1ad115651dc46a7752e7775a62a32a7046c3294e50b14725b
diff --git a/sys-power/nut/nut-2.6.0.ebuild b/sys-power/nut/nut-2.6.0.ebuild
new file mode 100644
index 000000000000..eae6848b2a7d
--- /dev/null
+++ b/sys-power/nut/nut-2.6.0.ebuild
@@ -0,0 +1,218 @@
+# Copyright 1999-2011 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/sys-power/nut/nut-2.6.0.ebuild,v 1.1 2011/03/13 21:09:29 ssuominen Exp $
+
+EAPI=2
+inherit autotools bash-completion eutils fixheadtails multilib
+
+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="~alpha ~amd64 ~ppc ~ppc64 ~sparc ~x86 ~x86-fbsd"
+IUSE="cgi snmp usb ssl tcpd xml"
+
+RDEPEND="cgi? ( >=media-libs/gd-2[png] )
+ snmp? ( net-analyzer/net-snmp )
+ usb? ( virtual/libusb:0 )
+ ssl? ( >=dev-libs/openssl-1 )
+ tcpd? ( sys-apps/tcp-wrappers )
+ xml? ( >=net-libs/neon-0.25.0 )
+ >=sys-fs/udev-114"
+DEPEND="$RDEPEND
+ >=sys-apps/sed-4
+ dev-util/pkgconfig"
+
+S=${WORKDIR}/${MY_P}
+
+# 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}"/${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 -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
+
+ eautoreconf
+}
+
+src_configure() {
+ local myconf
+
+ if [ -n "${NUT_DRIVERS}" ]; then
+ myconf="${myconf} --with-drivers=${NUT_DRIVERS// /,}"
+ fi
+
+ 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-dev \
+ $(use_with usb) \
+ --without-hal \
+ $(use_with snmp) \
+ $(use_with xml neon) \
+ --without-powerman \
+ $(use_with ssl) \
+ $(use_with tcpd wrap) \
+ $(use_with cgi) \
+ --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 \
+ ${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.2.2-init.d-upsd upsd || die
+ newinitd "${FILESDIR}"/nut-2.2.2-init.d-upsdrv upsdrv || die
+ newinitd "${FILESDIR}"/nut-2.2.2-init.d-upsmon upsmon || die
+ newinitd "${FILESDIR}"/nut.powerfail.initd nut.powerfail || die
+
+ # 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
+
+ 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} "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} ''
+
+}