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