1 |
commit: 43b989d2dbd829437d65f6c72fc13d45d79b6e62 |
2 |
Author: Conrad Kostecki <conikost <AT> gentoo <DOT> org> |
3 |
AuthorDate: Fri Jul 9 22:27:16 2021 +0000 |
4 |
Commit: Conrad Kostecki <conikost <AT> gentoo <DOT> org> |
5 |
CommitDate: Fri Jul 9 22:36:38 2021 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=43b989d2 |
7 |
|
8 |
sys-power/nut: drop old version |
9 |
|
10 |
Closes: https://bugs.gentoo.org/781509 |
11 |
Package-Manager: Portage-3.0.20, Repoman-3.0.3 |
12 |
Signed-off-by: Conrad Kostecki <conikost <AT> gentoo.org> |
13 |
|
14 |
sys-power/nut/nut-2.7.4-r6.ebuild | 272 -------------------------------------- |
15 |
1 file changed, 272 deletions(-) |
16 |
|
17 |
diff --git a/sys-power/nut/nut-2.7.4-r6.ebuild b/sys-power/nut/nut-2.7.4-r6.ebuild |
18 |
deleted file mode 100644 |
19 |
index 740b94d0c14..00000000000 |
20 |
--- a/sys-power/nut/nut-2.7.4-r6.ebuild |
21 |
+++ /dev/null |
22 |
@@ -1,272 +0,0 @@ |
23 |
-# Copyright 1999-2020 Gentoo Authors |
24 |
-# Distributed under the terms of the GNU General Public License v2 |
25 |
- |
26 |
-EAPI=7 |
27 |
- |
28 |
-inherit autotools bash-completion-r1 desktop fixheadtails flag-o-matic systemd toolchain-funcs user |
29 |
- |
30 |
-MY_P=${P/_/-} |
31 |
- |
32 |
-DESCRIPTION="Network-UPS Tools" |
33 |
-HOMEPAGE="https://www.networkupstools.org/" |
34 |
-SRC_URI="https://networkupstools.org/source/${PV%.*}/${MY_P}.tar.gz" |
35 |
-LICENSE="GPL-2" |
36 |
-SLOT="0" |
37 |
-KEYWORDS="amd64 arm ppc ppc64 x86" |
38 |
- |
39 |
-IUSE="cgi ipmi snmp +usb selinux split-usr ssl tcpd xml zeroconf" |
40 |
- |
41 |
-DEPEND=" |
42 |
- dev-libs/libltdl:* |
43 |
- net-libs/libnsl |
44 |
- virtual/udev |
45 |
- cgi? ( >=media-libs/gd-2[png] ) |
46 |
- ipmi? ( sys-libs/freeipmi ) |
47 |
- snmp? ( net-analyzer/net-snmp ) |
48 |
- ssl? ( >=dev-libs/openssl-1:= ) |
49 |
- tcpd? ( sys-apps/tcp-wrappers ) |
50 |
- usb? ( virtual/libusb:0= ) |
51 |
- xml? ( >=net-libs/neon-0.25.0 ) |
52 |
- zeroconf? ( net-dns/avahi )" |
53 |
- |
54 |
-BDEPEND=" |
55 |
- virtual/pkgconfig" |
56 |
- |
57 |
-RDEPEND="${DEPEND} |
58 |
- selinux? ( sec-policy/selinux-nut )" |
59 |
- |
60 |
-S="${WORKDIR}/${MY_P}" |
61 |
- |
62 |
-# Bug #480664 requested UPS_DRIVERS_IUSE for more flexibility in building this package |
63 |
-SERIAL_DRIVERLIST="al175 bcmxcp belkin belkinunv bestfcom bestfortress bestuferrups bestups dummy-ups etapro everups gamatronic genericups isbmex liebert liebert-esp2 masterguard metasys oldmge-shut mge-utalk microdowell mge-shut oneac optiups powercom rhino safenet solis tripplite tripplitesu upscode2 victronups powerpanel blazer_ser clone clone-outlet ivtscd apcsmart apcsmart-old apcupsd-ups riello_ser nutdrv_qx" |
64 |
-SNMP_DRIVERLIST="snmp-ups" |
65 |
-USB_LIBUSB_DRIVERLIST="usbhid-ups bcmxcp_usb tripplite_usb blazer_usb richcomm_usb riello_usb nutdrv_qx" |
66 |
-USB_DRIVERLIST=${USB_LIBUSB_DRIVERLIST} |
67 |
-#HAL_DRIVERLIST="usbhid-ups bcmxcp_usb tripplite_usb blazer_usb riello_usb nutdrv_qx" |
68 |
-NEONXML_DRIVERLIST="netxml-ups" |
69 |
-IPMI_DRIVERLIST="nut-ipmipsu" |
70 |
-# Now we build from it: |
71 |
-for name in ${SERIAL_DRIVERLIST} ; do |
72 |
- IUSE_UPS_DRIVERS="${IUSE_UPS_DRIVERS} +ups_drivers_${name}" |
73 |
-done |
74 |
-for name in ${USB_DRIVERLIST} ; do |
75 |
- IUSE_UPS_DRIVERS="${IUSE_UPS_DRIVERS} +ups_drivers_${name}" |
76 |
- REQUIRED_USE="${REQUIRED_USE} ups_drivers_${name}? ( usb )" |
77 |
-done |
78 |
-for name in ${NEONXML_DRIVERLIST}; do |
79 |
- IUSE_UPS_DRIVERS="${IUSE_UPS_DRIVERS} ups_drivers_${name}" |
80 |
- REQUIRED_USE="${REQUIRED_USE} ups_drivers_${name}? ( xml )" |
81 |
-done |
82 |
-for name in ${SNMP_DRIVERLIST} ; do |
83 |
- IUSE_UPS_DRIVERS="${IUSE_UPS_DRIVERS} ups_drivers_${name}" |
84 |
- REQUIRED_USE="${REQUIRED_USE} ups_drivers_${name}? ( snmp )" |
85 |
-done |
86 |
-for name in ${IPMI_DRIVERLIST} ; do |
87 |
- IUSE_UPS_DRIVERS="${IUSE_UPS_DRIVERS} ups_drivers_${name}" |
88 |
- REQUIRED_USE="${REQUIRED_USE} ups_drivers_${name}? ( ipmi )" |
89 |
-done |
90 |
-IUSE="${IUSE} ${IUSE_UPS_DRIVERS}" |
91 |
- |
92 |
-# public files should be 644 root:root |
93 |
-NUT_PUBLIC_FILES="/etc/nut/{ups,upssched}.conf" |
94 |
-# private files should be 640 root:nut - readable by nut, writeable by root, |
95 |
-NUT_PRIVATE_FILES="/etc/nut/{upsd.conf,upsd.users,upsmon.conf}" |
96 |
-# public files should be 644 root:root, only installed if USE=cgi |
97 |
-NUT_CGI_FILES="/etc/nut/{{hosts,upsset}.conf,upsstats{,-single}.html}" |
98 |
- |
99 |
-PATCHES=( |
100 |
- "${FILESDIR}"/${PN}-2.7.2-no-libdummy.patch |
101 |
- "${FILESDIR}"/${PN}-2.7.1-snmpusb-order.patch |
102 |
- "${FILESDIR}"/${PN}-2.6.2-lowspeed-buffer-size.patch |
103 |
- "${FILESDIR}"/nut-openssl-1.1-support.patch |
104 |
- "${FILESDIR}"/nut-2.7.4-py3.patch |
105 |
-) |
106 |
- |
107 |
-pkg_setup() { |
108 |
- enewgroup nut 84 |
109 |
- enewuser nut 84 -1 /var/lib/nut nut,uucp |
110 |
- # As of udev-104, NUT must be in uucp and NOT in tty. |
111 |
- gpasswd -d nut tty 2>/dev/null |
112 |
- gpasswd -a nut uucp 2>/dev/null |
113 |
- # in some cases on old systems it wasn't in the nut group either! |
114 |
- gpasswd -a nut nut 2>/dev/null |
115 |
- warningmsg ewarn |
116 |
-} |
117 |
- |
118 |
-src_prepare() { |
119 |
- default |
120 |
- |
121 |
- sed -e "s:GD_LIBS.*=.*-L/usr/X11R6/lib \(.*\) -lXpm -lX11:GD_LIBS=\"\1:" \ |
122 |
- -e '/systemdsystemunitdir=.*echo.*sed.*libdir/s,^,#,g' \ |
123 |
- -i configure.ac || die |
124 |
- |
125 |
- sed -e "s:52.nut-usbups.rules:70-nut-usbups.rules:" \ |
126 |
- -i scripts/udev/Makefile.am || die |
127 |
- |
128 |
- rm ltmain.sh m4/lt* m4/libtool.m4 || die |
129 |
- |
130 |
- sed -e 's:@LIBSSL_LDFLAGS@:@LIBSSL_LIBS@:' \ |
131 |
- -i lib/libupsclient{.pc,-config}.in || die #361685 |
132 |
- |
133 |
- eautoreconf |
134 |
-} |
135 |
- |
136 |
-src_configure() { |
137 |
- local myconf |
138 |
- append-flags -fno-lto |
139 |
- tc-export CC |
140 |
- tc-export CXX |
141 |
- tc-export AR |
142 |
- |
143 |
- local UPS_DRIVERS="" |
144 |
- for u in $USE ; do |
145 |
- u2=${u#ups_drivers_} |
146 |
- [[ "${u}" != "${u2}" ]] && UPS_DRIVERS="${UPS_DRIVERS} ${u2}" |
147 |
- done |
148 |
- UPS_DRIVERS="${UPS_DRIVERS# }" UPS_DRIVERS="${UPS_DRIVERS% }" |
149 |
- myconf="${myconf} --with-drivers=${UPS_DRIVERS// /,}" |
150 |
- |
151 |
- use cgi && myconf="${myconf} --with-cgipath=/usr/share/nut/cgi" |
152 |
- |
153 |
- # TODO: USE flag for sys-power/powerman |
154 |
- econf \ |
155 |
- --sysconfdir=/etc/nut \ |
156 |
- --datarootdir=/usr/share/nut \ |
157 |
- --datadir=/usr/share/nut \ |
158 |
- --disable-static \ |
159 |
- --with-statepath=/var/lib/nut \ |
160 |
- --with-drvpath=/$(get_libdir)/nut \ |
161 |
- --with-htmlpath=/usr/share/nut/html \ |
162 |
- --with-user=nut \ |
163 |
- --with-group=nut \ |
164 |
- --with-logfacility=LOG_DAEMON \ |
165 |
- --with-dev \ |
166 |
- --with-serial \ |
167 |
- --with-systemdsystemunitdir="$(systemd_get_systemunitdir)" \ |
168 |
- --without-powerman \ |
169 |
- $(use_with cgi) \ |
170 |
- $(use_with ipmi) \ |
171 |
- $(use_with ipmi freeipmi) \ |
172 |
- $(use_with snmp) \ |
173 |
- $(use_with ssl) \ |
174 |
- $(use_with tcpd wrap) \ |
175 |
- $(use_with usb) \ |
176 |
- $(use_with xml neon) \ |
177 |
- $(use_with zeroconf avahi) \ |
178 |
- ${myconf} |
179 |
-} |
180 |
- |
181 |
-src_install() { |
182 |
- emake DESTDIR="${D}" install |
183 |
- |
184 |
- find "${D}" -name '*.la' -delete || die |
185 |
- |
186 |
- dodir /sbin |
187 |
- use split-usr && dosym ../usr/sbin/upsdrvctl /sbin/upsdrvctl |
188 |
- |
189 |
- if use cgi; then |
190 |
- elog "CGI monitoring scripts are installed in /usr/share/nut/cgi." |
191 |
- elog "copy them to your web server's ScriptPath to activate (this is a" |
192 |
- elog "change from the old location)." |
193 |
- elog "If you use lighttpd, see lighttpd_nut.conf in the documentation." |
194 |
- fi |
195 |
- |
196 |
- # this must be done after all of the install phases |
197 |
- for i in "${D}"/etc/nut/*.sample ; do |
198 |
- mv "${i}" "${i/.sample/}" || die |
199 |
- done |
200 |
- |
201 |
- local DOCS=( AUTHORS ChangeLog docs/*.txt MAINTAINERS NEWS README TODO UPGRADING ) |
202 |
- einstalldocs |
203 |
- |
204 |
- newdoc lib/README README.lib |
205 |
- newdoc "${FILESDIR}"/lighttpd_nut.conf-2.2.0 lighttpd_nut.conf |
206 |
- |
207 |
- docinto cables |
208 |
- dodoc docs/cables/* |
209 |
- |
210 |
- newinitd "${FILESDIR}"/nut-2.6.5-init.d-upsd upsd |
211 |
- newinitd "${FILESDIR}"/nut-2.2.2-init.d-upsdrv upsdrv |
212 |
- newinitd "${FILESDIR}"/nut-2.6.5-init.d-upsmon upsmon |
213 |
- newinitd "${FILESDIR}"/nut-2.6.5-init.d-upslog upslog |
214 |
- newinitd "${FILESDIR}"/nut.powerfail.initd nut.powerfail |
215 |
- |
216 |
- keepdir /var/lib/nut |
217 |
- |
218 |
- einfo "Setting up permissions on files and directories" |
219 |
- fperms 0700 /var/lib/nut |
220 |
- fowners nut:nut /var/lib/nut |
221 |
- |
222 |
- # Do not remove eval here, because the variables contain shell expansions. |
223 |
- eval fperms 0640 ${NUT_PRIVATE_FILES} |
224 |
- eval fowners root:nut ${NUT_PRIVATE_FILES} |
225 |
- |
226 |
- # Do not remove eval here, because the variables contain shell expansions. |
227 |
- eval fperms 0644 ${NUT_PUBLIC_FILES} |
228 |
- eval fowners root:root ${NUT_PUBLIC_FILES} |
229 |
- |
230 |
- # Do not remove eval here, because the variables contain shell expansions. |
231 |
- if use cgi; then |
232 |
- eval fperms 0644 ${NUT_CGI_FILES} |
233 |
- eval fowners root:root ${NUT_CGI_FILES} |
234 |
- fi |
235 |
- |
236 |
- # this is installed for 2.4 and fbsd guys |
237 |
- if ! has_version virtual/udev; then |
238 |
- einfo "Installing non-udev hotplug support" |
239 |
- insinto /etc/hotplug/usb |
240 |
- insopts -m 755 |
241 |
- doins scripts/hotplug/nut-usbups.hotplug |
242 |
- fi |
243 |
- |
244 |
- newbashcomp "${S}"/scripts/misc/nut.bash_completion upsc |
245 |
- bashcomp_alias upsc upscmd upsd upsdrvctl upsmon upsrw |
246 |
-} |
247 |
- |
248 |
-pkg_postinst() { |
249 |
- # this is to ensure that everybody that installed old versions still has |
250 |
- # correct permissions |
251 |
- |
252 |
- chown nut:nut "${ROOT}"/var/lib/nut 2>/dev/null |
253 |
- chmod 0700 "${ROOT}"/var/lib/nut 2>/dev/null |
254 |
- |
255 |
- # Do not remove eval here, because the variables contain shell expansions. |
256 |
- eval chown root:nut "${ROOT}"${NUT_PRIVATE_FILES} 2>/dev/null |
257 |
- eval chmod 0640 "${ROOT}"${NUT_PRIVATE_FILES} 2>/dev/null |
258 |
- |
259 |
- # Do not remove eval here, because the variables contain shell expansions. |
260 |
- eval chown root:root "${ROOT}"${NUT_PUBLIC_FILES} 2>/dev/null |
261 |
- eval chmod 0644 "${ROOT}"${NUT_PUBLIC_FILES} 2>/dev/null |
262 |
- |
263 |
- # Do not remove eval here, because the variables contain shell expansions. |
264 |
- if use cgi; then |
265 |
- eval chown root:root "${ROOT}"${NUT_CGI_FILES} 2>/dev/null |
266 |
- eval chmod 0644 "${ROOT}"${NUT_CGI_FILES} 2>/dev/null |
267 |
- fi |
268 |
- |
269 |
- warningmsg elog |
270 |
-} |
271 |
- |
272 |
-warningmsg() { |
273 |
- msgfunc="$1" |
274 |
- [ -z "$msgfunc" ] && die "msgfunc not specified in call to warningmsg!" |
275 |
- ${msgfunc} "Please note that NUT now runs under the 'nut' user." |
276 |
- ${msgfunc} "NUT is in the uucp group for access to RS-232 UPS." |
277 |
- ${msgfunc} "However if you use a USB UPS you may need to look at the udev or" |
278 |
- ${msgfunc} "hotplug rules that are installed, and alter them suitably." |
279 |
- ${msgfunc} '' |
280 |
- ${msgfunc} "You are strongly advised to read the UPGRADING file provided by upstream." |
281 |
- ${msgfunc} '' |
282 |
- ${msgfunc} "Please note that upsdrv is NOT automatically started by upsd anymore." |
283 |
- ${msgfunc} "If you have multiple UPS units, you can use their NUT names to" |
284 |
- ${msgfunc} "have a service per UPS:" |
285 |
- ${msgfunc} "ln -s /etc/init.d/upsdrv /etc/init.d/upsdrv.\$UPSNAME" |
286 |
- ${msgfunc} '' |
287 |
- ${msgfunc} 'If you want apcupsd to power off your UPS when it' |
288 |
- ${msgfunc} 'shuts down your system in a power failure, you must' |
289 |
- ${msgfunc} 'add nut.powerfail to your shutdown runlevel:' |
290 |
- ${msgfunc} '' |
291 |
- ${msgfunc} 'rc-update add nut.powerfail shutdown' |
292 |
- ${msgfunc} '' |
293 |
- |
294 |
-} |