summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDaniel Robbins <drobbins@gentoo.org>2001-10-06 16:44:02 +0000
committerDaniel Robbins <drobbins@gentoo.org>2001-10-06 16:44:02 +0000
commit93edc958c77b220bcd93ecf29e71759d48504693 (patch)
tree5b33829fdc488a8805629d8ec1c0d758c8adb90f /sys-apps/apcupsd
parentmissed bonobo-conf (diff)
downloadhistorical-93edc958c77b220bcd93ecf29e71759d48504693.tar.gz
historical-93edc958c77b220bcd93ecf29e71759d48504693.tar.bz2
historical-93edc958c77b220bcd93ecf29e71759d48504693.zip
fixums
Diffstat (limited to 'sys-apps/apcupsd')
-rw-r--r--sys-apps/apcupsd/apcupsd-3.8.1.ebuild71
-rw-r--r--sys-apps/apcupsd/files/apcupsd33
-rwxr-xr-xsys-apps/apcupsd/files/halt2
3 files changed, 42 insertions, 64 deletions
diff --git a/sys-apps/apcupsd/apcupsd-3.8.1.ebuild b/sys-apps/apcupsd/apcupsd-3.8.1.ebuild
index 713eb8e6eeb6..2637dec8e347 100644
--- a/sys-apps/apcupsd/apcupsd-3.8.1.ebuild
+++ b/sys-apps/apcupsd/apcupsd-3.8.1.ebuild
@@ -1,52 +1,45 @@
-# Copyright 1999-2000 Gentoo Technologies, Inc.
+# Copyright 1999-2001 Gentoo Technologies, Inc.
# Distributed under the terms of the GNU General Public License, v2 or later
-# Author Holger Brueckner <darks@gentoo.org>
-# $Header: /var/cvsroot/gentoo-x86/sys-apps/apcupsd/apcupsd-3.8.1.ebuild,v 1.4 2001/08/31 03:23:39 pm Exp $
+# Maintainer: System Team <system@gentoo.org>
+# Author: Holger Brueckner <darks@gentoo.org>, Daniel Robbins <drobbins@gentoo.org>
+# $Header: /var/cvsroot/gentoo-x86/sys-apps/apcupsd/apcupsd-3.8.1.ebuild,v 1.5 2001/10/06 16:44:02 drobbins Exp $
+# WARNING: THIS EBUILD HAS ONLY BEEN PARTIALLY CONVERTED TO THE NEW RC6 INITSCRIPTS
-A=${P}.tar.gz
S=${WORKDIR}/${P}
-DESCRIPTION="apc ups daemon with integrated tcp/ip remote shutdown"
-SRC_URI="http://www.sibbald.com/apcupsd/download/oldversions/${A}"
+DESCRIPTION="APC UPS daemon with integrated tcp/ip remote shutdown"
+SRC_URI="http://www.sibbald.com/apcupsd/download/oldversions/${P}.tar.gz"
HOMEPAGE="http://www.sibbald.com/apcupsd/"
DEPEND="virtual/glibc"
src_compile() {
- try ./configure
- try make
+ ./configure || die
+ make || die
}
src_install () {
- dosbin apcupsd apcaccess apcnetd
- cd ${S}/etc
- dodir etc/apcupsd
- insinto etc/apcupsd
- doins *.conf
- exeinto etc/apcupsd
- doexe changeme commfailure commok mainsback onbattery
- doexe ${FILESDIR}/apccontrol
- dodir var/log/apcupsd
- sed -e "s:/etc/apcupsd:/var/log/apcupsd:g" ${D}/etc/apcupsd/apcupsd.conf > ${D}/etc/apcupsd/apcupsd.conf.tmp
- mv ${D}/etc/apcupsd/apcupsd.conf.tmp ${D}/etc/apcupsd/apcupsd.conf
- cd ${S}/doc
- dodoc *
- docinto developers
- dodoc developers/*
- docinto manual
- dodoc manual/*
- mv ${S}/doc/apcupsd.man ${S}/doc/apcupsd.8
- doman apcupsd.8
- dodir /etc/rc.d/init.d
- exeinto /etc/rc.d/init.d
- doexe ${FILESDIR}/apcupsd
- doexe ${FILESDIR}/halt
-}
-
-pkg_postinst () {
- rc-update add apcupsd
-}
-
-pkg_prerm() {
- rc-update del apcupsd
+ dosbin apcupsd apcaccess apcnetd
+ cd ${S}/etc
+ dodir etc/apcupsd
+ insinto etc/apcupsd
+ doins *.conf
+ exeinto etc/apcupsd
+ doexe changeme commfailure commok mainsback onbattery
+ doexe ${FILESDIR}/apccontrol
+ dodir var/log/apcupsd
+ sed -e "s:/etc/apcupsd:/var/log/apcupsd:g" ${D}/etc/apcupsd/apcupsd.conf > ${D}/etc/apcupsd/apcupsd.conf.tmp
+ mv ${D}/etc/apcupsd/apcupsd.conf.tmp ${D}/etc/apcupsd/apcupsd.conf
+ cd ${S}/doc
+ dodoc *
+ docinto developers
+ dodoc developers/*
+ docinto manual
+ dodoc manual/*
+ mv ${S}/doc/apcupsd.man ${S}/doc/apcupsd.8
+ doman apcupsd.8
+ dodir /etc/init.d
+ exeinto /etc/init.d
+ doexe ${FILESDIR}/apcupsd
+ doexe ${FILESDIR}/halt
}
diff --git a/sys-apps/apcupsd/files/apcupsd b/sys-apps/apcupsd/files/apcupsd
index aca9c397350a..4a75bd6b1e2e 100644
--- a/sys-apps/apcupsd/files/apcupsd
+++ b/sys-apps/apcupsd/files/apcupsd
@@ -1,32 +1,17 @@
-#!/bin/sh
-#RCUPDATE:2 3 4:80:This line is required for script management
-
-. /etc/rc.d/config/functions
+#!/sbin/runscript
SERVICE=apcupsd
-DESC="apcupsd"
EXE=/usr/sbin/apcupsd
-opts="start stop restart"
start() {
- rm -f /etc/apcupsd/powerfail
- ebegin "Starting ${DESC}"
- start-stop-daemon --start --quiet --exec ${EXE} -- 1>&2
- eend $? "Error starting ${DESC}."
+ rm -f /etc/apcupsd/powerfail
+ ebegin "Starting ${EXE}"
+ start-stop-daemon --start --quiet --exec ${EXE} -- 1>&2
+ eend $? "Error starting ${EXE}."
}
stop() {
- ebegin "Stopping ${DESC}"
- start-stop-daemon --stop --quiet --exec ${EXE} -- 1>&2
- eend $? "Error stopping ${DESC}."
-}
-
-restart() {
-
- stop
- start
-
-}
-
-
-doservice ${@}
+ ebegin "Stopping ${EXE}"
+ start-stop-daemon --stop --quiet --exec ${EXE} -- 1>&2
+ eend $? "Error stopping ${EXE}."
+}
diff --git a/sys-apps/apcupsd/files/halt b/sys-apps/apcupsd/files/halt
index 3d2a9422e266..be982cf792ca 100755
--- a/sys-apps/apcupsd/files/halt
+++ b/sys-apps/apcupsd/files/halt
@@ -3,7 +3,7 @@
# halt Execute the halt command.
#
# Version: @(#)halt 2.75 19-May-1998 miquels@cistron.nl
-# modified by Holger Brueckner <darksi@gentoo.org>
+# modified by Holger Brueckner <darks@gentoo.org>
# for apcupsd 28-June-2001
PATH=/sbin:/bin:/usr/sbin:/usr/bin