From 48b52d9685126e9df0046113fd176e9660d2ac34 Mon Sep 17 00:00:00 2001
From: Michael Imhof <tantive@gentoo.org>
Date: Sun, 27 Aug 2006 09:19:49 +0000
Subject: Version bumped. (Portage version: 2.1.1_rc1)

---
 sys-power/apcupsd/ChangeLog                     |   9 +-
 sys-power/apcupsd/apcupsd-3.12.4.ebuild         | 115 ++++++++++++++++
 sys-power/apcupsd/files/3.12.4/apcupsd.in.patch |  15 ++
 sys-power/apcupsd/files/3.12.4/etc.patch        | 175 ++++++++++++++++++++++++
 sys-power/apcupsd/files/digest-apcupsd-3.12.4   |   3 +
 5 files changed, 316 insertions(+), 1 deletion(-)
 create mode 100644 sys-power/apcupsd/apcupsd-3.12.4.ebuild
 create mode 100644 sys-power/apcupsd/files/3.12.4/apcupsd.in.patch
 create mode 100644 sys-power/apcupsd/files/3.12.4/etc.patch
 create mode 100644 sys-power/apcupsd/files/digest-apcupsd-3.12.4

(limited to 'sys-power')

diff --git a/sys-power/apcupsd/ChangeLog b/sys-power/apcupsd/ChangeLog
index 915b5d1c2103..be3aceb7b906 100644
--- a/sys-power/apcupsd/ChangeLog
+++ b/sys-power/apcupsd/ChangeLog
@@ -1,6 +1,13 @@
 # ChangeLog for sys-power/apcupsd
 # Copyright 1999-2006 Gentoo Foundation; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo-x86/sys-power/apcupsd/ChangeLog,v 1.19 2006/06/21 18:28:36 tantive Exp $
+# $Header: /var/cvsroot/gentoo-x86/sys-power/apcupsd/ChangeLog,v 1.20 2006/08/27 09:19:49 tantive Exp $
+
+*apcupsd-3.12.4 (27 Aug 2006)
+
+  27 Aug 2006; Michael Imhof <tantive@gentoo.org>
+  +files/3.12.4/apcupsd.in.patch, +files/3.12.4/etc.patch,
+  +apcupsd-3.12.4.ebuild:
+  Version bumped.
 
 *apcupsd-3.12.3 (21 Jun 2006)
 
diff --git a/sys-power/apcupsd/apcupsd-3.12.4.ebuild b/sys-power/apcupsd/apcupsd-3.12.4.ebuild
new file mode 100644
index 000000000000..d8238f920c28
--- /dev/null
+++ b/sys-power/apcupsd/apcupsd-3.12.4.ebuild
@@ -0,0 +1,115 @@
+# Copyright 1999-2006 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/sys-power/apcupsd/apcupsd-3.12.4.ebuild,v 1.1 2006/08/27 09:19:49 tantive Exp $
+
+inherit eutils webapp
+
+DESCRIPTION="APC UPS daemon with integrated tcp/ip remote shutdown"
+HOMEPAGE="http://www.apcupsd.org/"
+SRC_URI="mirror://sourceforge/apcupsd/${P}.tar.gz"
+
+LICENSE="GPL-2"
+WEBAPP_MANUAL_SLOT="yes"
+SLOT="0"
+KEYWORDS="~amd64 ~ppc ~sparc ~x86 ~x86-fbsd"
+IUSE="doc snmp usb cgi threads ncurses nls"
+
+DEPEND="doc? ( virtual/tetex
+		dev-tex/latex2html )
+	cgi? ( >=media-libs/gd-1.8.4 )
+	ncurses? ( sys-libs/ncurses )
+	nls? ( sys-devel/gettext )
+	snmp? ( net-analyzer/net-snmp )"
+RDEPEND="${DEPEND}
+	virtual/mta"
+
+pkg_setup() {
+	use cgi && webapp_pkg_setup
+}
+
+src_unpack() {
+	unpack ${A}
+	cd ${S}/platforms/gentoo
+	epatch ${FILESDIR}/${PV}/apcupsd.in.patch
+
+	cd ${S}/platforms
+	epatch ${FILESDIR}/${PV}/etc.patch
+
+	# Avoid usage of install -s, leave to portage stripping binaries
+	sed -i -e 's:(INSTALL_PROGRAM) -s:(INSTALL_PROGRAM):g' \
+		${S}/src/Makefile.in ${S}/src/cgi/Makefile.in
+}
+
+src_compile() {
+	local myconf
+	use cgi && myconf="${myconf} --enable-cgi --with-cgi-bin=${MY_CGIBINDIR}"
+	use usb && myconf="${myconf} --with-upstype=usb --with-upscable=usb --enable-usb"
+	use !usb && myconf="${myconf} --with-upstype=apcsmart --with-upscable=apcsmart --disable-usb"
+
+	# We force the DISTNAME to gentoo so it will use gentoo's layout also
+	# when installed on non-linux systems.
+	DISTNAME=gentoo APCUPSD_MAIL=/usr/sbin/sendmail ./configure \
+		--prefix=/usr \
+		--sbindir=/sbin \
+		--mandir=/usr/share/man \
+		--sysconfdir=/etc/apcupsd \
+		--with-pwrfail-dir=/etc/apcupsd \
+		--with-lock-dir=/var/lock \
+		--with-pid-dir=/var/run \
+		--with-log-dir=/var/log \
+		--with-net-port=6666 \
+		--with-nis-port=3551 \
+		--enable-net \
+		--enable-oldnet \
+		--enable-master-slave \
+		$(use_enable ncurses powerflute) \
+		$(use_enable threads pthreads) \
+		$(use_enable snmp net-snmp) \
+		$(use_enable nls) \
+		${myconf} \
+		|| die
+	make || die
+
+	if use doc; then
+		einfo "Building full documentation..."
+		cd ${S}/doc/latex
+		make texcheck tex web pdf
+	fi
+}
+
+src_install() {
+	use cgi && webapp_src_preinst
+
+	make DESTDIR=${D} install || die "installed failed"
+	rm -f "${D}"/etc/init.d/halt
+
+	insinto /etc/apcupsd
+	newins examples/safe.apccontrol safe.apccontrol
+
+	dodoc ChangeLog* ReleaseNotes
+	mv doc/apctest.man doc/apctest.8; doman doc/apctest.8
+
+	if use doc; then
+		einfo "Installing full documentation..."
+		newdoc doc/latex/apcupsd.pdf manual.pdf
+		dohtml -r doc/latex/apcupsd/*
+	fi
+
+	if use cgi; then
+		mv ${D}/etc/apcupsd/apcupsd.css ${D}${MY_CGIBINDIR}
+		webapp_src_install
+	fi
+}
+
+pkg_postinst() {
+	if use cgi; then
+		einfo If you are upgrading from a previous version, please note
+		einfo that the CGI interface is now installed using webapp-config.
+		einfo /var/www/apcupsd is no longer present.
+		webapp_pkg_postinst
+	fi
+}
+
+pkg_prerm() {
+	use cgi && webapp_pkg_prerm
+}
diff --git a/sys-power/apcupsd/files/3.12.4/apcupsd.in.patch b/sys-power/apcupsd/files/3.12.4/apcupsd.in.patch
new file mode 100644
index 000000000000..7bcb0f41c086
--- /dev/null
+++ b/sys-power/apcupsd/files/3.12.4/apcupsd.in.patch
@@ -0,0 +1,15 @@
+--- apcupsd.in	2002-09-14 14:03:18.000000000 +0200
++++ apcupsd.in.new	2003-11-06 16:34:28.000000000 +0100
+@@ -6,6 +6,12 @@
+ APCPID=@PIDDIR@/apcupsd.pid
+ APCUPSD=@sbindir@/apcupsd
+ 
++depend() {
++	after hotplug
++	after usb
++	after net
++}
++
+ start() {
+ 	rm -f /etc/apcupsd/powerfail
+ 	ebegin "Starting APC UPS daemon"
diff --git a/sys-power/apcupsd/files/3.12.4/etc.patch b/sys-power/apcupsd/files/3.12.4/etc.patch
new file mode 100644
index 000000000000..a3acfdbd6fe4
--- /dev/null
+++ b/sys-power/apcupsd/files/3.12.4/etc.patch
@@ -0,0 +1,175 @@
+diff -cwb etc.bak/changeme.in etc/changeme.in
+*** etc.bak/changeme.in	Sun Mar 19 01:39:52 2006
+--- etc/changeme.in	Sun Mar 19 01:41:31 2006
+***************
+*** 13,21 ****
+  #
+  (
+     echo "Subject: $MSG"
+     echo " "
+     echo "$MSG"
+     echo " "
+     @sbindir@/apcaccess status
+! ) | $APCUPSD_MAIL -s "$MSG" $SYSADMIN
+  exit 0
+--- 13,22 ----
+  #
+  (
+     echo "Subject: $MSG"
++    echo "To: $SYSADMIN"
+     echo " "
+     echo "$MSG"
+     echo " "
+     @sbindir@/apcaccess status
+! ) | $APCUPSD_MAIL $SYSADMIN
+  exit 0
+diff -cwb etc.bak/commfailure.in etc/commfailure.in
+*** etc.bak/commfailure.in	Sun Mar 19 01:39:52 2006
+--- etc/commfailure.in	Sun Mar 19 01:41:51 2006
+***************
+*** 13,21 ****
+  #
+  (
+     echo "Subject: $MSG"
+     echo " "
+     echo "$MSG"
+     echo " "
+     @sbindir@/apcaccess status
+! ) | $APCUPSD_MAIL -s "$MSG" $SYSADMIN
+  exit 0
+--- 13,22 ----
+  #
+  (
+     echo "Subject: $MSG"
++    echo "To: $SYSADMIN"
+     echo " "
+     echo "$MSG"
+     echo " "
+     @sbindir@/apcaccess status
+! ) | $APCUPSD_MAIL $SYSADMIN
+  exit 0
+diff -cwb etc.bak/commok.in etc/commok.in
+*** etc.bak/commok.in	Sun Mar 19 01:39:52 2006
+--- etc/commok.in	Sun Mar 19 01:42:05 2006
+***************
+*** 13,21 ****
+  #
+  (
+     echo "Subject: $MSG"
+     echo " "
+     echo "$MSG"
+     echo " "
+     @sbindir@/apcaccess status
+! ) | $APCUPSD_MAIL -s "$MSG" $SYSADMIN
+  exit 0
+--- 13,22 ----
+  #
+  (
+     echo "Subject: $MSG"
++    echo "To: $SYSADMIN"
+     echo " "
+     echo "$MSG"
+     echo " "
+     @sbindir@/apcaccess status
+! ) | $APCUPSD_MAIL $SYSADMIN
+  exit 0
+diff -cwb etc.bak/masterconnect.in etc/masterconnect.in
+*** etc.bak/masterconnect.in	Sun Mar 19 01:39:52 2006
+--- etc/masterconnect.in	Sun Mar 19 01:42:22 2006
+***************
+*** 13,21 ****
+  #
+  (
+     echo "Subject: $MSG"
+     echo " "
+     echo "$MSG"
+     echo " "
+     @sbindir@/apcaccess status
+! ) | $APCUPSD_MAIL -s "$MSG" $SYSADMIN
+  exit 0
+--- 13,22 ----
+  #
+  (
+     echo "Subject: $MSG"
++    echo "To: $SYSADMIN"
+     echo " "
+     echo "$MSG"
+     echo " "
+     @sbindir@/apcaccess status
+! ) | $APCUPSD_MAIL $SYSADMIN
+  exit 0
+diff -cwb etc.bak/mastertimeout.in etc/mastertimeout.in
+*** etc.bak/mastertimeout.in	Sun Mar 19 01:39:52 2006
+--- etc/mastertimeout.in	Sun Mar 19 01:42:35 2006
+***************
+*** 13,21 ****
+  #
+  (
+     echo "Subject: $MSG"
+     echo " "
+     echo "$MSG"
+     echo " "
+     @sbindir@/apcaccess status
+! ) | $APCUPSD_MAIL -s "$MSG" $SYSADMIN
+  exit 0
+--- 13,22 ----
+  #
+  (
+     echo "Subject: $MSG"
++    echo "To: $SYSADMIN"
+     echo " "
+     echo "$MSG"
+     echo " "
+     @sbindir@/apcaccess status
+! ) | $APCUPSD_MAIL $SYSADMIN
+  exit 0
+diff -cwb etc.bak/offbattery.in etc/offbattery.in
+*** etc.bak/offbattery.in	Sun Mar 19 01:39:52 2006
+--- etc/offbattery.in	Sun Mar 19 01:42:53 2006
+***************
+*** 13,21 ****
+  #
+  (
+     echo "Subject: $MSG"
+     echo " "
+     echo "$MSG"
+     echo " "
+     @sbindir@/apcaccess status
+! ) | $APCUPSD_MAIL -s "$MSG" $SYSADMIN
+  exit 0
+--- 13,22 ----
+  #
+  (
+     echo "Subject: $MSG"
++    echo "To: $SYSADMIN"
+     echo " "
+     echo "$MSG"
+     echo " "
+     @sbindir@/apcaccess status
+! ) | $APCUPSD_MAIL $SYSADMIN
+  exit 0
+diff -cwb etc.bak/onbattery.in etc/onbattery.in
+*** etc.bak/onbattery.in	Sun Mar 19 01:39:52 2006
+--- etc/onbattery.in	Sun Mar 19 01:43:10 2006
+***************
+*** 13,21 ****
+  #
+  (
+     echo "Subject: $MSG"
+     echo " "
+     echo "$MSG"
+     echo " "
+     @sbindir@/apcaccess status
+! ) | $APCUPSD_MAIL -s "$MSG" $SYSADMIN
+  exit 0
+--- 13,22 ----
+  #
+  (
+     echo "Subject: $MSG"
++    echo "To: $SYSADMIN"
+     echo " "
+     echo "$MSG"
+     echo " "
+     @sbindir@/apcaccess status
+! ) | $APCUPSD_MAIL $SYSADMIN
+  exit 0
diff --git a/sys-power/apcupsd/files/digest-apcupsd-3.12.4 b/sys-power/apcupsd/files/digest-apcupsd-3.12.4
new file mode 100644
index 000000000000..a2fc4f98671d
--- /dev/null
+++ b/sys-power/apcupsd/files/digest-apcupsd-3.12.4
@@ -0,0 +1,3 @@
+MD5 669c833ec02a2bc29fa98f845e5f5de5 apcupsd-3.12.4.tar.gz 4223158
+RMD160 a54c2f6d71c902d7963a1c65a3850f657aabaa88 apcupsd-3.12.4.tar.gz 4223158
+SHA256 e2c789089a71f8bafc2812a5e20b73f5420e4c234961afb53a30f6ff891640ba apcupsd-3.12.4.tar.gz 4223158
-- 
cgit v1.2.3-65-gdbad