summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAchim Gottinger <achim@gentoo.org>2000-08-09 22:58:29 +0000
committerAchim Gottinger <achim@gentoo.org>2000-08-09 22:58:29 +0000
commit96540e2dfb86585f13ebf2c7731d5a3548eeb19b (patch)
tree45128f31289fe74b61ea9155e7df783f368a3c44 /net-misc/nut
parent*** empty log message *** (diff)
downloadgentoo-2-96540e2dfb86585f13ebf2c7731d5a3548eeb19b.tar.gz
gentoo-2-96540e2dfb86585f13ebf2c7731d5a3548eeb19b.tar.bz2
gentoo-2-96540e2dfb86585f13ebf2c7731d5a3548eeb19b.zip
*** empty log message ***
Diffstat (limited to 'net-misc/nut')
-rw-r--r--net-misc/nut/files/digest1
-rwxr-xr-xnet-misc/nut/files/upsd33
-rw-r--r--net-misc/nut/nut-0.44.0-r1.ebuild58
3 files changed, 92 insertions, 0 deletions
diff --git a/net-misc/nut/files/digest b/net-misc/nut/files/digest
new file mode 100644
index 000000000000..29002576f332
--- /dev/null
+++ b/net-misc/nut/files/digest
@@ -0,0 +1 @@
+MD5 98314d5eb66db0e0eb367623cff16e56 nut-0.44.0.tar.gz
diff --git a/net-misc/nut/files/upsd b/net-misc/nut/files/upsd
new file mode 100755
index 000000000000..9226b7dfa18d
--- /dev/null
+++ b/net-misc/nut/files/upsd
@@ -0,0 +1,33 @@
+#!/bin/sh
+#RCUPDATE:2 3 4:75:This line is required for script management
+
+. /etc/rc.d/config/functions
+
+SERVICE=upsd
+opts="start stop restart"
+
+PIDFILE=/var/run/upsd.pid
+EXE=/usr/bin/upsd
+
+start() {
+ ebegin "Starting $SERVICE..."
+ start-stop-daemon --start --quiet --exec $EXE
+ eend $? "Started $SERVICE." "Error Starting $SERVICE."
+}
+
+stop() {
+ ebegin "Stopping $SERVICE..."
+ start-stop-daemon --stop --quiet --exec $EXE
+ eend $? "Stopped $SERVICE." "Error Stopping $SERVICE."
+}
+
+restart() {
+
+ stop
+ start
+
+}
+
+doservice ${@}
+
+
diff --git a/net-misc/nut/nut-0.44.0-r1.ebuild b/net-misc/nut/nut-0.44.0-r1.ebuild
new file mode 100644
index 000000000000..1ae54aa04bb1
--- /dev/null
+++ b/net-misc/nut/nut-0.44.0-r1.ebuild
@@ -0,0 +1,58 @@
+# Copyright 1999-2000 Gentoo Technologies, Inc.
+# Distributed under the terms of the GNU General Public License, v2 or later
+# Author Achim Gottinger <achim@gentoo.org>
+# $Header: /var/cvsroot/gentoo-x86/net-misc/nut/nut-0.44.0-r1.ebuild,v 1.1 2000/08/09 22:58:29 achim Exp $
+
+P=nut-0.44.0
+A=${P}.tar.gz
+S=${WORKDIR}/${P}
+CATEGORY="net-misc"
+DESCRIPTION="Network-UPS Tools"
+SRC_URI="http://www.exploits.org/nut/release/"${A}
+HOMEPAGE="http://www.exploits.org/nut/"
+
+
+src_unpack() {
+ unpack ${A}
+}
+
+src_compile() {
+ cd ${S}
+ ./configure --host=${CHOST} --prefix=/usr --sysconfdir=/etc/nut
+ make
+ make cgi
+}
+
+src_install() {
+ cd ${S}
+ make BASEPATH=${D}/usr CONFPATH=${D}/etc/nut STATEPATH=${D}/var/state/ups \
+ install
+ cd clients
+ exeinto /usr/local/httpd/cgi-bin/nut
+ doexe *.cgi
+ into /usr
+ dolib upsfetch.o
+ insinto /usr/include
+ doins upsfetch.h
+ cd ..
+ rmdir ${D}/usr/misc
+ insinto /etc/rc.d/init.d
+ doins ${O}/files/upsd
+ dodoc COPYING CREDITS Changes QUICKSTART README
+ docinto docs
+ dodoc docs/*.txt docs/FAQ docs/Changes.trust
+ docinto cables
+ dodoc docs/cables/*.txt
+}
+
+
+pkg_config() {
+
+ . ${ROOT}/etc/rc.d/config/functions
+
+ einfo "Generating symlinks..."
+ ${ROOT}/usr/sbin/rc-update add upsd
+
+}
+
+