summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMax Kalika <max@gentoo.org>2003-10-16 23:26:29 +0000
committerMax Kalika <max@gentoo.org>2003-10-16 23:26:29 +0000
commit55e2557e26fab444027f7bf40c3b20a2062f8575 (patch)
tree679956df4d0425dbe96fc178345a2af83fcc7546 /net-misc/nut
parentAdd CGI flag for net-misc/nut. (diff)
downloadgentoo-2-55e2557e26fab444027f7bf40c3b20a2062f8575.tar.gz
gentoo-2-55e2557e26fab444027f7bf40c3b20a2062f8575.tar.bz2
gentoo-2-55e2557e26fab444027f7bf40c3b20a2062f8575.zip
Major cleanup. Thanks Robin.
Diffstat (limited to 'net-misc/nut')
-rw-r--r--net-misc/nut/ChangeLog8
-rw-r--r--net-misc/nut/Manifest19
-rw-r--r--net-misc/nut/files/digest-nut-1.4.0-r11
-rw-r--r--net-misc/nut/files/upsd.rc625
-rw-r--r--net-misc/nut/files/upsmon.rc625
-rw-r--r--net-misc/nut/metadata.xml8
-rw-r--r--net-misc/nut/nut-1.4.0-r1.ebuild81
7 files changed, 159 insertions, 8 deletions
diff --git a/net-misc/nut/ChangeLog b/net-misc/nut/ChangeLog
index 38f0afbc70c5..4d260d5e71a8 100644
--- a/net-misc/nut/ChangeLog
+++ b/net-misc/nut/ChangeLog
@@ -1,6 +1,12 @@
# ChangeLog for net-misc/nut
# Copyright 2002-2003 Gentoo Technologies, Inc.; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo-x86/net-misc/nut/ChangeLog,v 1.17 2003/08/10 19:17:01 prez Exp $
+# $Header: /var/cvsroot/gentoo-x86/net-misc/nut/ChangeLog,v 1.18 2003/10/16 23:26:27 max Exp $
+
+*nut-1.4.0-r1 (16 Oct 2003)
+
+ 16 Oct 2003; Max Kalika <max@gentoo.org> metadata.xml, nut-1.4.0-r1.ebuild,
+ files/upsd.rc6, files/upsmon.rc6:
+ Major cleanup.
*nut-1.5.1 (10 Aug 2003)
diff --git a/net-misc/nut/Manifest b/net-misc/nut/Manifest
index fc49969b139e..1bb11a4b22bb 100644
--- a/net-misc/nut/Manifest
+++ b/net-misc/nut/Manifest
@@ -1,17 +1,22 @@
-MD5 73a2dece57269bb0fdcbdaa5cd2b0eac ChangeLog 2496
+MD5 96547e9537bb024f208d43371aa5f2b2 nut-1.4.0.ebuild 3362
MD5 6aab9abab0b73d9a5a7a78e644433734 nut-1.0.0.ebuild 2527
-MD5 bb9618c8b03a1237cd7ab2ac7c060cae nut-1.2.1-r1.ebuild 3237
MD5 e7b0cec5163957ce8fbd4f6911a35e3e nut-1.2.1.ebuild 2921
-MD5 9f1719e548b416ed9d719b908e1fa520 nut-1.2.2.ebuild 3283
MD5 7eb4b01b750fa4ca836f8d76e17b217d nut-1.3.6.ebuild 3362
-MD5 96547e9537bb024f208d43371aa5f2b2 nut-1.4.0.ebuild 3362
+MD5 72ac604c561eeb8394cfb20f0877cad7 nut-1.4.0-r1.ebuild 2125
+MD5 9f1719e548b416ed9d719b908e1fa520 nut-1.2.2.ebuild 3283
+MD5 bb9618c8b03a1237cd7ab2ac7c060cae nut-1.2.1-r1.ebuild 3237
+MD5 bf52d4219d300ca5f3966015591a7b53 ChangeLog 2656
MD5 cf7701e7f443498501140c4a537410bf nut-1.5.1.ebuild 3366
+MD5 91a159b983332d5ed0fb985cc1fe1b80 metadata.xml 330
MD5 53b3c22e90b76d9ed4ac9cbbef393c31 files/digest-nut-1.0.0 61
MD5 4f6c951306e95660e88086bc591f03d0 files/digest-nut-1.2.1 61
-MD5 4f6c951306e95660e88086bc591f03d0 files/digest-nut-1.2.1-r1 61
MD5 ab96c8181bf3780dae5e3377987b05c2 files/digest-nut-1.2.2 61
-MD5 c5fa9d5b07e3724f41bb5fd83bbcc4c7 files/upsd-init 596
-MD5 2bbffa4aad5969fa3d0d74a6039d6070 files/upsmon-init 491
MD5 391798e93c10d171a3a7f9941527e293 files/digest-nut-1.3.6 61
MD5 de17bbc812bdd76ec7b807a0deb5e636 files/digest-nut-1.4.0 61
MD5 884831c15f0700dbc89db196a32a2695 files/digest-nut-1.5.1 61
+MD5 2bbffa4aad5969fa3d0d74a6039d6070 files/upsmon-init 491
+MD5 4f6c951306e95660e88086bc591f03d0 files/digest-nut-1.2.1-r1 61
+MD5 de17bbc812bdd76ec7b807a0deb5e636 files/digest-nut-1.4.0-r1 61
+MD5 f8462813ecdb575332f5fd9b8afe8291 files/upsd.rc6 592
+MD5 d7a81750b9c1eafd1a1c94dd492ce5bb files/upsmon.rc6 594
+MD5 c5fa9d5b07e3724f41bb5fd83bbcc4c7 files/upsd-init 596
diff --git a/net-misc/nut/files/digest-nut-1.4.0-r1 b/net-misc/nut/files/digest-nut-1.4.0-r1
new file mode 100644
index 000000000000..1a233a0f22a5
--- /dev/null
+++ b/net-misc/nut/files/digest-nut-1.4.0-r1
@@ -0,0 +1 @@
+MD5 1ddf547866db0f1eeb9c535ba0339906 nut-1.4.0.tar.gz 523924
diff --git a/net-misc/nut/files/upsd.rc6 b/net-misc/nut/files/upsd.rc6
new file mode 100644
index 000000000000..dff8ea70e345
--- /dev/null
+++ b/net-misc/nut/files/upsd.rc6
@@ -0,0 +1,25 @@
+#!/sbin/runscript
+# Copyright 1999-2003 Gentoo Technologies, Inc.
+# Distributed under the terms of the GNU General Public License, v2 or later
+# $Header: /var/cvsroot/gentoo-x86/net-misc/nut/files/upsd.rc6,v 1.1 2003/10/16 23:26:27 max Exp $
+
+depend() {
+ need net
+ before upsmon
+}
+
+start() {
+ ebegin "Starting upsd"
+ /sbin/upsdrvctl start
+ start-stop-daemon --start --quiet --startas /usr/sbin/upsd \
+ --pidfile=/var/state/nut/upsd.pid
+ eend $?
+}
+
+stop() {
+ ebegin "Stopping upsd"
+ start-stop-daemon --stop --quiet --pidfile=/var/state/nut/upsd.pid
+ rc=$?
+ /sbin/upsdrvctl stop
+ eend $rc
+}
diff --git a/net-misc/nut/files/upsmon.rc6 b/net-misc/nut/files/upsmon.rc6
new file mode 100644
index 000000000000..cdcf346141a4
--- /dev/null
+++ b/net-misc/nut/files/upsmon.rc6
@@ -0,0 +1,25 @@
+#!/sbin/runscript
+# Copyright 1999-2003 Gentoo Technologies, Inc.
+# Distributed under the terms of the GNU General Public License, v2 or later
+# $Header: /var/cvsroot/gentoo-x86/net-misc/nut/files/upsmon.rc6,v 1.1 2003/10/16 23:26:27 max Exp $
+
+depend() {
+ need net
+ before upsmon
+}
+
+start() {
+ ebegin "Starting upsd"
+ /sbin/upsdrvctl start
+ start-stop-daemon --start --quiet --startas /usr/sbin/upsd \
+ --pidfile=/var/state/nut/upsd.pid
+ eend $?
+}
+
+stop() {
+ ebegin "Stopping upsd"
+ start-stop-daemon --stop --quiet --pidfile=/var/state/nut/upsd.pid
+ rc=$?
+ /sbin/upsdrvctl stop
+ eend $rc
+}
diff --git a/net-misc/nut/metadata.xml b/net-misc/nut/metadata.xml
new file mode 100644
index 000000000000..8cd3f6b2face
--- /dev/null
+++ b/net-misc/nut/metadata.xml
@@ -0,0 +1,8 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+<herd>no-herd</herd>
+<maintainer><email>robbat2@gentoo.org</email></maintainer>
+<maintainer><email>prez@gentoo.org</email></maintainer>
+<maintainer><email>max@gentoo.org</email></maintainer>
+</pkgmetadata>
diff --git a/net-misc/nut/nut-1.4.0-r1.ebuild b/net-misc/nut/nut-1.4.0-r1.ebuild
new file mode 100644
index 000000000000..ae85653933d8
--- /dev/null
+++ b/net-misc/nut/nut-1.4.0-r1.ebuild
@@ -0,0 +1,81 @@
+# Copyright 1999-2003 Gentoo Technologies, Inc.
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/net-misc/nut/nut-1.4.0-r1.ebuild,v 1.1 2003/10/16 23:26:27 max Exp $
+
+DESCRIPTION="Network-UPS Tools."
+SRC_URI="http://www.exploits.org/nut/release/${PV%.*}/${P}.tar.gz"
+HOMEPAGE="http://www.exploits.org/nut/"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~x86 ~sparc"
+IUSE="cgi"
+
+DEPEND=">=sys-apps/sed-4
+ cgi? ( =media-libs/libgd-1* )"
+
+src_unpack() {
+ unpack ${A} && cd "${S}"
+
+ sed -e "s:GD_LIBS.*=.*-L/usr/X11R6/lib \(.*\) -lXpm -lX11:GD_LIBS=\"\1:" \
+ -i configure.in || die "sed failed"
+}
+
+src_compile() {
+ local myconf
+ myconf="${myconf} `use_with cgi` `use_with cgi cgipath /usr/share/nut`"
+
+ WANT_AUTOCONF_2_5=1 autoconf
+ econf \
+ --with-user=nut \
+ --with-group=nut \
+ --with-drvpath=/usr/lib/nut \
+ --sysconfdir=/etc/nut \
+ --with-logfacility=LOG_DAEMON \
+ --with-statepath=/var/lib/nut \
+ --with-linux-hiddev \
+ ${myconf}
+
+ sed -e "s:= bestups:= hidups bestups:" \
+ -i drivers/Makefile || die "sed failed"
+ sed -e "s:= powercom.8:= hidups.8 powercom.8:" \
+ -i man/Makefile || "sed failed"
+
+ emake || die "compile problem"
+
+ if [ "`use cgi`" ] ; then
+ emake cgi || die "compile cgi problem"
+ fi
+}
+
+src_install() {
+ make DESTDIR="${D}" install || die "make install failed"
+ keepdir /var/lib/nut
+
+ for i in "${D}"/etc/nut/*.sample ; do
+ mv "${i}" "${i/.sample/}"
+ done
+
+ if [ "`use cgi`" ] ; then
+ make DESTDIR="${D}" install-cgi || die "make install-cgi failed"
+ einfo "CGI monitoring scripts are installed in /usr/share/nut,"
+ einfo "copy them to your web server's ScriptPath to activate."
+ fi
+
+ dodoc CHANGES COPYING CREDITS INSTALL MAINTAINERS NEWS README UPGRADING \
+ docs/{FAQ,*.txt,driver.list}
+
+ docinto cables
+ dodoc docs/cables/*
+
+ exeinto /etc/init.d
+ newexe "${FILESDIR}/upsd.rc6" upsd
+ newexe "${FILESDIR}/upsmon.rc6" upsmon
+}
+
+pkg_postinst() {
+ chown nut:nut ${ROOT}/var/lib/nut
+ chmod 0700 ${ROOT}/var/lib/nut
+ chown root:nut ${ROOT}/etc/nut/{upsd.conf,upsd.users,upsmon.conf}
+ chmod 0640 ${ROOT}/etc/nut/{upsd.conf,upsd.users,upsmon.conf}
+}