Gentoo Archives: gentoo-commits

From: "Diego Petteno (flameeyes)" <flameeyes@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] gentoo-x86 commit in sys-power/apcupsd: ChangeLog apcupsd-3.14.5-r2.ebuild apcupsd-3.14.5.ebuild apcupsd-3.14.5-r1.ebuild
Date: Sun, 22 Mar 2009 13:58:14
Message-Id: E1LlOBo-00087l-36@stork.gentoo.org
1 flameeyes 09/03/22 13:58:12
2
3 Modified: ChangeLog
4 Added: apcupsd-3.14.5-r2.ebuild
5 Removed: apcupsd-3.14.5.ebuild apcupsd-3.14.5-r1.ebuild
6 Log:
7 Add init script for shutting the UPS down on power failure. Thanks to Matt Whitlock in bug #262234.
8 (Portage version: 2.2_rc26/cvs/Linux x86_64)
9
10 Revision Changes Path
11 1.43 sys-power/apcupsd/ChangeLog
12
13 file : http://sources.gentoo.org/viewcvs.py/gentoo-x86/sys-power/apcupsd/ChangeLog?rev=1.43&view=markup
14 plain: http://sources.gentoo.org/viewcvs.py/gentoo-x86/sys-power/apcupsd/ChangeLog?rev=1.43&content-type=text/plain
15 diff : http://sources.gentoo.org/viewcvs.py/gentoo-x86/sys-power/apcupsd/ChangeLog?r1=1.42&r2=1.43
16
17 Index: ChangeLog
18 ===================================================================
19 RCS file: /var/cvsroot/gentoo-x86/sys-power/apcupsd/ChangeLog,v
20 retrieving revision 1.42
21 retrieving revision 1.43
22 diff -u -r1.42 -r1.43
23 --- ChangeLog 11 Mar 2009 11:23:11 -0000 1.42
24 +++ ChangeLog 22 Mar 2009 13:58:12 -0000 1.43
25 @@ -1,6 +1,14 @@
26 # ChangeLog for sys-power/apcupsd
27 # Copyright 1999-2009 Gentoo Foundation; Distributed under the GPL v2
28 -# $Header: /var/cvsroot/gentoo-x86/sys-power/apcupsd/ChangeLog,v 1.42 2009/03/11 11:23:11 flameeyes Exp $
29 +# $Header: /var/cvsroot/gentoo-x86/sys-power/apcupsd/ChangeLog,v 1.43 2009/03/22 13:58:12 flameeyes Exp $
30 +
31 +*apcupsd-3.14.5-r2 (22 Mar 2009)
32 +
33 + 22 Mar 2009; Diego E. Pettenò <flameeyes@g.o>
34 + +files/apcupsd.powerfail.init, -apcupsd-3.14.5.ebuild,
35 + -apcupsd-3.14.5-r1.ebuild, +apcupsd-3.14.5-r2.ebuild:
36 + Add init script for shutting the UPS down on power failure. Thanks to Matt
37 + Whitlock in bug #262234.
38
39 *apcupsd-3.14.5-r1 (11 Mar 2009)
40
41
42
43
44 1.1 sys-power/apcupsd/apcupsd-3.14.5-r2.ebuild
45
46 file : http://sources.gentoo.org/viewcvs.py/gentoo-x86/sys-power/apcupsd/apcupsd-3.14.5-r2.ebuild?rev=1.1&view=markup
47 plain: http://sources.gentoo.org/viewcvs.py/gentoo-x86/sys-power/apcupsd/apcupsd-3.14.5-r2.ebuild?rev=1.1&content-type=text/plain
48
49 Index: apcupsd-3.14.5-r2.ebuild
50 ===================================================================
51 # Copyright 1999-2009 Gentoo Foundation
52 # Distributed under the terms of the GNU General Public License v2
53 # $Header: /var/cvsroot/gentoo-x86/sys-power/apcupsd/apcupsd-3.14.5-r2.ebuild,v 1.1 2009/03/22 13:58:12 flameeyes Exp $
54
55 WEBAPP_MANUAL_SLOT="yes"
56 WEBAPP_OPTIONAL="yes"
57 inherit eutils webapp
58
59 DESCRIPTION="APC UPS daemon with integrated tcp/ip remote shutdown"
60 HOMEPAGE="http://www.apcupsd.org/"
61 SRC_URI="mirror://sourceforge/apcupsd/${P}.tar.gz"
62
63 LICENSE="GPL-2"
64 SLOT="0"
65 KEYWORDS="~alpha ~amd64 ~ppc ~sparc ~x86 ~x86-fbsd"
66 IUSE="doc snmp usb cgi nls gnome"
67
68 DEPEND="doc? ( virtual/latex-base
69 dev-tex/latex2html
70 app-text/dvipdfm )
71 cgi? ( >=media-libs/gd-1.8.4
72 ${WEBAPP_DEPEND} )
73 nls? ( sys-devel/gettext )
74 snmp? ( net-analyzer/net-snmp )
75 gnome? ( >=x11-libs/gtk+-2.4.0
76 >=dev-libs/glib-2.0
77 >=gnome-base/gconf-2.0 )"
78 RDEPEND="${DEPEND}
79 virtual/mailx"
80
81 pkg_setup() {
82 use cgi && webapp_pkg_setup
83 }
84
85 src_compile() {
86 local myconf
87 use cgi && myconf="${myconf} --enable-cgi --with-cgi-bin=${MY_CGIBINDIR}"
88 if use usb; then
89 myconf="${myconf} --with-upstype=usb --with-upscable=usb --enable-usb --with-dev= "
90 else
91 myconf="${myconf} --with-upstype=apcsmart --with-upscable=smart --disable-usb"
92 fi
93
94 # We force the DISTNAME to gentoo so it will use gentoo's layout also
95 # when installed on non-linux systems.
96 econf \
97 --sbindir=/sbin \
98 --sysconfdir=/etc/apcupsd \
99 --with-pwrfail-dir=/etc/apcupsd \
100 --with-lock-dir=/var/lock \
101 --with-pid-dir=/var/run \
102 --with-log-dir=/var/log \
103 --with-nis-port=3551 \
104 --enable-net --enable-pcnet \
105 --with-distname=gentoo \
106 $(use_enable snmp net-snmp) \
107 $(use_enable gnome gapcmon) \
108 ${myconf} \
109 APCUPSD_MAIL=/bin/mail \
110 || die "econf failed"
111 emake || die "emake failed"
112
113 if use doc; then
114 einfo "Building full documentation..."
115 cd "${S}"/doc/latex
116 emake -j1 texcheck tex web pdf || die "doc build failed"
117 fi
118 }
119
120 src_install() {
121 use cgi && webapp_src_preinst
122
123 emake DESTDIR="${D}" install || die "installed failed"
124 rm -f "${D}"/etc/init.d/halt
125
126 insinto /etc/apcupsd
127 newins examples/safe.apccontrol safe.apccontrol
128
129 dodoc ChangeLog* ReleaseNotes
130 newman doc/apctest.man apctest.8 || die "newman failed"
131
132 if use doc; then
133 einfo "Installing full documentation..."
134 newdoc doc/latex/apcupsd.pdf manual.pdf || die "pdf doc failed"
135 dohtml -r doc/latex/apcupsd/* || die "doc install failed"
136 fi
137
138 use cgi && webapp_src_install
139
140 rm "${D}"/etc/init.d/apcupsd
141 newinitd "${FILESDIR}/${PN}.init.2" "${PN}" || die "newinitd failed"
142 newinitd "${FILESDIR}/${PN}.powerfail.init" "${PN}".powerfail || die "newinitd failed"
143 }
144
145 pkg_postinst() {
146 if use cgi; then
147 elog "If you are upgrading from a previous version, please note"
148 elog "that the CGI interface is now installed using webapp-config."
149 elog "/var/www/apcupsd is no longer present."
150 webapp_pkg_postinst
151 fi
152
153 elog ""
154 elog "Since version 3.14.0 you can use multiple apcupsd instances to"
155 elog "control more than one UPS in a single box."
156 elog "To do this, create a link between /etc/init.d/apcupsd to a new"
157 elog "/etc/init.d/apcupsd.something, and it will then load the"
158 elog "configuration file at /etc/apcupsd/something.conf."
159 elog ""
160
161 if [ -d "${ROOT}"/etc/runlevels/shutdown -a \
162 ! -e "${ROOT}"/etc/runlevels/shutdown/"${PN}".powerfail ] ; then
163 elog 'If you want apcupsd to power off your UPS when it'
164 elog 'shuts down your system in a power failure, you must'
165 elog 'add apcupsd.powerfail to your shutdown runlevel:'
166 elog ''
167 elog ' \e[01m rc-update add apcupsd.powerfail shutdown \e[0m'
168 elog ''
169 fi
170 }
171
172 pkg_prerm() {
173 use cgi && webapp_pkg_prerm
174 }