diff options
author | Michael Imhof <tantive@gentoo.org> | 2007-05-02 21:12:23 +0000 |
---|---|---|
committer | Michael Imhof <tantive@gentoo.org> | 2007-05-02 21:12:23 +0000 |
commit | 76b65b74262ce9c8f7d305d6c27fe14e9384f6c0 (patch) | |
tree | e401676eed4feb3f52fa7e8aca64c3d6d0c16f3c /sys-power | |
parent | Updated locales, compatibility, and ssl plugins. (diff) | |
download | gentoo-2-76b65b74262ce9c8f7d305d6c27fe14e9384f6c0.tar.gz gentoo-2-76b65b74262ce9c8f7d305d6c27fe14e9384f6c0.tar.bz2 gentoo-2-76b65b74262ce9c8f7d305d6c27fe14e9384f6c0.zip |
Version bumped. Closing #167469.
(Portage version: 2.1.2.5)
Diffstat (limited to 'sys-power')
-rw-r--r-- | sys-power/apcupsd/ChangeLog | 5 | ||||
-rw-r--r-- | sys-power/apcupsd/apcupsd-3.14.0.ebuild | 122 | ||||
-rw-r--r-- | sys-power/apcupsd/files/3.14.0/apcupsd-3.14.0-apccontrol-gentoo.patch | 30 | ||||
-rw-r--r-- | sys-power/apcupsd/files/3.14.0/apcupsd.in.patch | 15 | ||||
-rw-r--r-- | sys-power/apcupsd/files/3.14.0/apcupsd.initd | 35 | ||||
-rw-r--r-- | sys-power/apcupsd/files/3.14.0/etc.patch | 61 | ||||
-rw-r--r-- | sys-power/apcupsd/files/3.14.0/no-parallel.patch | 13 | ||||
-rw-r--r-- | sys-power/apcupsd/files/digest-apcupsd-3.14.0 | 3 |
8 files changed, 283 insertions, 1 deletions
diff --git a/sys-power/apcupsd/ChangeLog b/sys-power/apcupsd/ChangeLog index 09c77c179630..bb3e43a57703 100644 --- a/sys-power/apcupsd/ChangeLog +++ b/sys-power/apcupsd/ChangeLog @@ -1,6 +1,9 @@ # ChangeLog for sys-power/apcupsd # Copyright 1999-2007 Gentoo Foundation; Distributed under the GPL v2 -# $Header: /var/cvsroot/gentoo-x86/sys-power/apcupsd/ChangeLog,v 1.26 2007/03/23 19:56:58 je_fro Exp $ +# $Header: /var/cvsroot/gentoo-x86/sys-power/apcupsd/ChangeLog,v 1.27 2007/05/02 21:12:23 tantive Exp $ + + 02 May 2007; Michael Imhof <tantive@gentoo.org> ChangeLog: + Version bumped. Closing #167469. 23 Mar 2007; Jeff Gardner <je_fro@gentoo.org> +files/3.12.4/apcupsd-snmp.patch, apcupsd-3.12.4.ebuild: diff --git a/sys-power/apcupsd/apcupsd-3.14.0.ebuild b/sys-power/apcupsd/apcupsd-3.14.0.ebuild new file mode 100644 index 000000000000..9d509dbabe00 --- /dev/null +++ b/sys-power/apcupsd/apcupsd-3.14.0.ebuild @@ -0,0 +1,122 @@ +# Copyright 1999-2007 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Header: /var/cvsroot/gentoo-x86/sys-power/apcupsd/apcupsd-3.14.0.ebuild,v 1.1 2007/05/02 21:12:23 tantive Exp $ + +WEBAPP_MANUAL_SLOT="yes" +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" +SLOT="0" +KEYWORDS="~alpha ~amd64 ~ppc ~sparc ~x86 ~x86-fbsd" +IUSE="doc snmp usb cgi threads ncurses nls gnome" + +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 ) + gnome? ( >=x11-libs/gtk+-2.4.0 + >=gnome-base/gconf-2.0 )" +RDEPEND="${DEPEND} + virtual/mta" + +pkg_setup() { + use cgi && webapp_pkg_setup +} + +src_unpack() { + unpack ${A} + cd "${S}" + epatch "${FILESDIR}"/${PV}/apcupsd.in.patch + epatch "${FILESDIR}"/${PV}/etc.patch + epatch "${FILESDIR}"/${PV}/no-parallel.patch + + epatch "${FILESDIR}"/${P}-apccontrol-gentoo.patch +} + +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-nis-port=3551 \ + --enable-net \ + $(use_enable ncurses powerflute) \ + $(use_enable threads pthreads) \ + $(use_enable snmp net-snmp) \ + $(use_enable nls) \ + $(use_enable gnome gapcmon) \ + ${myconf} \ + || die + emake || die "emake failed" + + 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 + + emake 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 + + rm "${D}"/etc/init.d/apcupsd + newinitd "${FILESDIR}/${PN}.initd" "${PN}" +} + +pkg_postinst() { + if use cgi; then + elog If you are upgrading from a previous version, please note + elog that the CGI interface is now installed using webapp-config. + elog /var/www/apcupsd is no longer present. + webapp_pkg_postinst + fi + + elog "" + elog "Since version 3.14.0 you can use multiple apcupsd instances to" + elog "control more than one UPS in a single box." + elog "To do this, create a link between /etc/init.d/apcupsd to a new" + elog "/etc/init.d/apcupsd.something, and it will then load the" + elog "configuration file at /etc/apcupsd/something.conf." + elog "" +} + +pkg_prerm() { + use cgi && webapp_pkg_prerm +} diff --git a/sys-power/apcupsd/files/3.14.0/apcupsd-3.14.0-apccontrol-gentoo.patch b/sys-power/apcupsd/files/3.14.0/apcupsd-3.14.0-apccontrol-gentoo.patch new file mode 100644 index 000000000000..4162a73390bc --- /dev/null +++ b/sys-power/apcupsd/files/3.14.0/apcupsd-3.14.0-apccontrol-gentoo.patch @@ -0,0 +1,30 @@ +Index: apcupsd-3.14.0/platforms/apccontrol.in +=================================================================== +--- apcupsd-3.14.0.orig/platforms/apccontrol.in ++++ apcupsd-3.14.0/platforms/apccontrol.in +@@ -18,7 +18,7 @@ + prefix=@prefix@ + exec_prefix=@exec_prefix@ + +-APCPID=@PIDDIR@/apcupsd.pid ++SERVICE=${SERVICE-apcupsd} + APCUPSD=@sbindir@/apcupsd + SHUTDOWN=@SHUTDOWN@ + SCRIPTSHELL=@SCRIPTSHELL@ +@@ -120,15 +120,7 @@ case "$1" in + echo "Remote Shutdown. Beginning Shutdown Sequence." | ${WALL} + ;; + restartme) +- echo -n "Restarting APCUPSD Power Management: " +- THEPID=`cat ${APCPID}` +- kill ${THEPID} +- rm -f ${APCPID} +- rm -f @PWRFAILDIR@/powerfail +- rm -f @nologdir@/nologin +- sleep 5 +- `${APCUPSD}` +- echo "apcupsd" ++ /etc/init.d/${SERVICE} restart + ;; + startselftest) + ;; diff --git a/sys-power/apcupsd/files/3.14.0/apcupsd.in.patch b/sys-power/apcupsd/files/3.14.0/apcupsd.in.patch new file mode 100644 index 000000000000..69dad9d74d1c --- /dev/null +++ b/sys-power/apcupsd/files/3.14.0/apcupsd.in.patch @@ -0,0 +1,15 @@ +--- platforms/gentoo/apcupsd.in ++++ platforms/gentoo/apcupsd.in +@@ -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.14.0/apcupsd.initd b/sys-power/apcupsd/files/3.14.0/apcupsd.initd new file mode 100644 index 000000000000..7475a181a2bb --- /dev/null +++ b/sys-power/apcupsd/files/3.14.0/apcupsd.initd @@ -0,0 +1,35 @@ +#!/sbin/runscript +# Copyright 2007 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Header: /var/cvsroot/gentoo-x86/sys-power/apcupsd/files/3.14.0/apcupsd.initd,v 1.1 2007/05/02 21:12:23 tantive Exp $ + +INSTANCE="${SVCNAME#*.}" +if [ -z "${INSTANCE}" ] || [ "${SVCNAME}" = "apcupsd" ]; then + INSTANCE="apcupsd" +fi + +depend() { + use net +} + +start() { + rm -f /etc/apcupsd/powerfail + + export SERVICE="${SVCNAME}" + + ebegin "Starting APC UPS daemon" + start-stop-daemon \ + --start --pidfile "/var/run/${SVCNAME}.pid" \ + --exec /sbin/apcupsd -- \ + -f "/etc/apcupsd/${INSTANCE}.conf" \ + -P "/var/run/${SVCNAME}.pid" + eend $? +} + +stop() { + ebegin "Stopping APC UPS daemon" + start-stop-daemon \ + --stop --pidfile "/var/run/${SVCNAME}.pid" \ + --exec /sbin/apcupsd + eend $? +} diff --git a/sys-power/apcupsd/files/3.14.0/etc.patch b/sys-power/apcupsd/files/3.14.0/etc.patch new file mode 100644 index 000000000000..cc8370b7618b --- /dev/null +++ b/sys-power/apcupsd/files/3.14.0/etc.patch @@ -0,0 +1,61 @@ +*** platforms/etc.bak/changeme.in 2007-02-18 14:58:16.000000000 +0100 +--- platforms/etc/changeme.in 2007-02-18 15:01:36.000000000 +0100 +*************** +*** 13,18 **** +--- 13,19 ---- + # + ( + echo "Subject: $MSG" ++ echo "To: $SYSADMIN" + echo " " + echo "$MSG" + echo " " +*** platforms/etc.bak/commfailure.in 2007-02-18 14:58:16.000000000 +0100 +--- platforms/etc/commfailure.in 2007-02-18 15:01:56.000000000 +0100 +*************** +*** 13,18 **** +--- 13,19 ---- + # + ( + echo "Subject: $MSG" ++ echo "To: $SYSADMIN" + echo " " + echo "$MSG" + echo " " +*** platforms/etc.bak/commok.in 2007-02-18 14:58:16.000000000 +0100 +--- platforms/etc/commok.in 2007-02-18 15:02:24.000000000 +0100 +*************** +*** 13,18 **** +--- 13,19 ---- + # + ( + echo "Subject: $MSG" ++ echo "To: $SYSADMIN" + echo " " + echo "$MSG" + echo " " +*** platforms/etc.bak/offbattery.in 2007-02-18 14:58:16.000000000 +0100 +--- platforms/etc/offbattery.in 2007-02-18 15:04:43.000000000 +0100 +*************** +*** 13,18 **** +--- 13,19 ---- + # + ( + echo "Subject: $MSG" ++ echo "To: $SYSADMIN" + echo " " + echo "$MSG" + echo " " +*** platforms/etc.bak/onbattery.in 2007-02-18 14:58:16.000000000 +0100 +--- platforms/etc/onbattery.in 2007-02-18 15:04:47.000000000 +0100 +*************** +*** 13,18 **** +--- 13,19 ---- + # + ( + echo "Subject: $MSG" ++ echo "To: $SYSADMIN" + echo " " + echo "$MSG" + echo " " + diff --git a/sys-power/apcupsd/files/3.14.0/no-parallel.patch b/sys-power/apcupsd/files/3.14.0/no-parallel.patch new file mode 100644 index 000000000000..a2aa4c398d1c --- /dev/null +++ b/sys-power/apcupsd/files/3.14.0/no-parallel.patch @@ -0,0 +1,13 @@ +upstream forces this cruft + +--- autoconf/targets.mak ++++ autoconf/targets.mak +@@ -5,6 +5,8 @@ + # + # Copyright (C) 1999-2002 Riccardo Facchetti <riccardo@master.oasi.gpa.it> + ++.NOTPARALLEL: ++ + # Tell versions [3.59,3.63) of GNU make not to export all variables. + # Otherwise a system limit (for SysV at least) may be exceeded. + .NOEXPORT: diff --git a/sys-power/apcupsd/files/digest-apcupsd-3.14.0 b/sys-power/apcupsd/files/digest-apcupsd-3.14.0 new file mode 100644 index 000000000000..f13bb68e4c21 --- /dev/null +++ b/sys-power/apcupsd/files/digest-apcupsd-3.14.0 @@ -0,0 +1,3 @@ +MD5 334fe3413c08f14acec0226e71e98e0a apcupsd-3.14.0.tar.gz 4356614 +RMD160 583527a79fdf3965676c310b801331e89e724d91 apcupsd-3.14.0.tar.gz 4356614 +SHA256 3d30e5234115b466b97434d8c74f0cfc96c3735add7eb725066e5043ffbd66aa apcupsd-3.14.0.tar.gz 4356614 |