summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichael Imhof <tantive@gentoo.org>2006-06-21 18:28:36 +0000
committerMichael Imhof <tantive@gentoo.org>2006-06-21 18:28:36 +0000
commit13b3cf605a508fb11fda85a9690625e3e0ae9488 (patch)
tree3fc88cae727b415ff523e8ce7243c0b035914a82 /sys-power/apcupsd
parentAdd ~amd64 per bug #128448 (diff)
downloadgentoo-2-13b3cf605a508fb11fda85a9690625e3e0ae9488.tar.gz
gentoo-2-13b3cf605a508fb11fda85a9690625e3e0ae9488.tar.bz2
gentoo-2-13b3cf605a508fb11fda85a9690625e3e0ae9488.zip
Version bumped. Closes #130714, #132157.
(Portage version: 2.1.1_pre1-r1)
Diffstat (limited to 'sys-power/apcupsd')
-rw-r--r--sys-power/apcupsd/ChangeLog9
-rw-r--r--sys-power/apcupsd/apcupsd-3.12.3.ebuild115
-rw-r--r--sys-power/apcupsd/files/3.12.3/apcupsd.in.patch15
-rw-r--r--sys-power/apcupsd/files/3.12.3/etc.patch175
-rw-r--r--sys-power/apcupsd/files/digest-apcupsd-3.12.33
5 files changed, 316 insertions, 1 deletions
diff --git a/sys-power/apcupsd/ChangeLog b/sys-power/apcupsd/ChangeLog
index c5762d658f13..915b5d1c2103 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.18 2006/05/20 11:45:59 flameeyes Exp $
+# $Header: /var/cvsroot/gentoo-x86/sys-power/apcupsd/ChangeLog,v 1.19 2006/06/21 18:28:36 tantive Exp $
+
+*apcupsd-3.12.3 (21 Jun 2006)
+
+ 21 Jun 2006; Michael Imhof <tantive@gentoo.org>
+ +files/3.12.3/apcupsd.in.patch, +files/3.12.3/etc.patch,
+ +apcupsd-3.12.3.ebuild:
+ Version bumped. Closes #130714, #132157.
20 May 2006; Diego Pettenò <flameeyes@gentoo.org>
apcupsd-3.12.2-r1.ebuild:
diff --git a/sys-power/apcupsd/apcupsd-3.12.3.ebuild b/sys-power/apcupsd/apcupsd-3.12.3.ebuild
new file mode 100644
index 000000000000..e7eb69fc56c6
--- /dev/null
+++ b/sys-power/apcupsd/apcupsd-3.12.3.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.3.ebuild,v 1.1 2006/06/21 18:28:36 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.3/apcupsd.in.patch b/sys-power/apcupsd/files/3.12.3/apcupsd.in.patch
new file mode 100644
index 000000000000..7bcb0f41c086
--- /dev/null
+++ b/sys-power/apcupsd/files/3.12.3/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.3/etc.patch b/sys-power/apcupsd/files/3.12.3/etc.patch
new file mode 100644
index 000000000000..a3acfdbd6fe4
--- /dev/null
+++ b/sys-power/apcupsd/files/3.12.3/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.3 b/sys-power/apcupsd/files/digest-apcupsd-3.12.3
new file mode 100644
index 000000000000..755e3076c489
--- /dev/null
+++ b/sys-power/apcupsd/files/digest-apcupsd-3.12.3
@@ -0,0 +1,3 @@
+MD5 e329c5b71cd4d6b179750a7c9b6f0c30 apcupsd-3.12.3.tar.gz 4222539
+RMD160 0f801e9405f79af6d70e56868d222f80f8bb1583 apcupsd-3.12.3.tar.gz 4222539
+SHA256 871dc9957998f9f23a92d3e2bfd38a28aad0a7972a9bd6652c1d045f3db45132 apcupsd-3.12.3.tar.gz 4222539