1 Summary: Network UPS Tools
2 Summary(pl): Sieciowe narzêdzie do UPS-ów
7 Group: Applications/System
8 Source0: http://penguin.harrison.k12.co.us/mirrors/nut/release/1.4/%{name}-%{version}.tar.gz
9 # Source0-md5: 1ddf547866db0f1eeb9c535ba0339906
11 Source2: %{name}.sysconfig
12 Source3: %{name}-upsmon.init
13 Source4: http://www.nixz.net/nut/everups.c
14 # NoSource4-md5: 526bd50f3f5cedf6d60b99998f866b0d
15 Patch0: %{name}-client.patch
16 Patch1: %{name}-datadir.patch
17 URL: http://www.exploits.org/nut/
18 BuildRequires: autoconf
19 BuildRequires: automake
20 BuildRequires: gd-devel >= 2.0.15
21 BuildRequires: libpng-devel
22 BuildRequires: openssl-devel >= 0.9.7
24 Requires(pre): /bin/id
25 Requires(pre): /usr/bin/getgid
26 Requires(pre): /usr/sbin/useradd
27 Requires(post,preun): /sbin/chkconfig
28 Requires(postun): /usr/sbin/groupdel
29 Requires(postun): /usr/sbin/userdel
30 Requires: %{name}-common = %{version}
31 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
32 Obsoletes: smartupstools
34 %define _sysconfdir /etc/ups
37 These programs are part of a developing project to monitor the
38 assortment of UPSes that are found out there in the field. Many models
39 have serial serial ports of some kind that allow some form of state
40 checking. This capability has been harnessed where possible to allow
41 for safe shutdowns, live status tracking on web pages, and more.
43 This nut ships with modified everups.c - support for Ever UPS models
44 (by Mikolaj Tutak <mtutak@eranet.pl>)
47 Te programy s± czê¶ci± projektu do monitorowania wielu UPS-ów w jakim¶
48 otoczeniu. Wiele modeli ma porty szeregowe i pozwala na jak±¶ formê
49 sprawdzania stanu. Ta funkcjonalno¶æ pozwala na bezpieczne
50 zatrzymywanie systemów, sprawdzanie stanu zasilania przez WWW i inne.
52 Ta wersja posiada zmieniony sterownik everups.c - obs³uguje zasilacze
53 firmy Ever UPS models (autorstwa Miko³aja Tutaka <mtutak@eranet.pl>)
56 üÔÉ ÐÒÏÇÒÁÍÍÙ - ÞÁÓÔØ ÐÒÏÅËÔÁ ÐÏ ÍÏÎÉÔÏÒÉÎÇÕ ÒÁÚÌÉÞÎÙÈ UPS. õ ÍÎÏÇÉÈ
57 ÍÏÄÅÌÅÊ ÅÓÔØ ÓÅÒÉÁÌØÎÙÅ ÐÏÒÔÙ, ÐÏÚ×ÏÌÑÀÝÉÅ ÐÒÏ×ÅÒÑÔØ ÓÏÓÔÏÑÎÉÅ ÜÔÉÈ
58 UPS. üÔÁ ×ÏÚÍÏÖÎÏÓÔØ ÂÙÌÁ ÉÓÐÏÌØÚÏ×ÁÎÁ, ÇÄÅ ÜÔÏ ×ÏÚÍÏÖÎÏ, ÄÌÑ
59 ×ÙÐÏÌÎÅÎÉÑ ÂÅÚÏÐÁÓÎÙÈ ÏÓÔÁÎÏ×Ï× ËÏÍÐØÀÔÅÒÏ×, ÏÔÓÌÅÖÉ×ÁÎÉÑ ÓÔÁÔÕÓÁ
63 㦠ÐÒÏÇÒÁÍÉ ¤ ÞÁÓÔÉÎÏÀ ÐÒÏÅËÔÕ ÐÏ ÍÏΦÔÏÒÉÎÇÕ Ò¦ÚÎÏÍÁΦÔÎÉÈ UPS.
64 âÁÇÁÔÏ ÍÏÄÅÌÅÊ ÍÁÀÔØ ÓÅÒ¦ÁÌØΦ ÐÏÒÔÉ, ÝÏ ÄÏÚ×ÏÌÑÔØ ÐÅÒÅצÒÑÔÉ ÓÔÁÎ ÃÉÈ
65 UPS. ãÑ ÍÏÖÌÉצÓÔØ ÂÕÌÁ ×ÉËÏÒÉÓÔÁÎÁ, ÄÅ ÃÅ ÍÏÖÌÉ×Ï, ÄÌÑ ×ÉËÏÎÁÎÎÑ
66 ÂÅÚÐÅÞÎÉÈ ÚÕÐÉÎÏË ËÏÍÐ'ÀÔÅÒ¦×, צÄÓ̦ÄËÏ×Õ×ÁÎÎÑ ÓÔÁÔÕÓÕ ÞÅÒÅÚ ×ÅÂ,
70 Summary: Package with common files for nut daemon and its clients
71 Summary(pl): Pakiet z plikami wspólnymi dla demona nut i jego klientów
72 Group: Applications/System
75 Package with common files for nut daemon and its clients.
77 %description common -l pl
78 Pakiet z plikami wspólnymi dla demona nut i jego klientów.
81 Summary: Multi-vendor UPS Monitoring Project Client Utilities
82 Summary(pl): Narzêdzia klienckie do monitorowania UPS-ów
83 Summary(uk): Network UPS Tools - Ë̦¤ÎÔÓØ˦ ÕÔÉ̦ÔÉ ÍÏΦÔÏÒÉÎÇÕ
84 Summary(ru): Network UPS Tools - ËÌÉÅÎÔÓËÉÅ ÕÔÉÌÉÔÙ ÍÏÎÉÔÏÒÉÎÇÁ
85 Group: Applications/System
87 Requires(post,preun): /sbin/chkconfig
88 Requires: %{name}-common = %{version}
91 This package includes the client utilities that are required to
92 monitor a UPS that the client host is plugged into but monitored via
93 serial cable by another host on the network....
95 %description client -l pl
96 Ten pakiet zawiera narzêdzia kliencie potrzebne do monitorowania UPS-a
97 do którego pod³±czony jest komputer kliencki, kiedy kabel szeregowy
98 UPS-a jest pod³±czony do innego komputera w sieci.
100 %description client -l ru
101 üÔÏÔ ÐÁËÅÔ ×ËÌÀÞÁÅÔ ËÌÉÅÎÔÓËÉÅ ÕÔÉÌÉÔÙ, ÎÅÏÂÈÏÄÉÍÙÅ ÄÌÑ ÍÏÎÉÔÏÒÉÎÇÁ
102 UPS, Ë ËÏÔÏÒÏÍÕ ËÌÉÅÎÔÓËÉÊ ÈÏÓÔ ÉÍÅÅÔ ÄÏÓÔÕÐ, ÎÏ UPS ÆÉÚÉÞÅÓËÉ
103 ÐÏÄËÌÀÞÅÎ Ë ÄÒÕÇÏÍÕ ËÏÍÐØÀÔÅÒÕ × ÓÅÔÉ.
105 %description client -l uk
106 ãÅÊ ÐÁËÅÔ ×ËÌÀÞÁ¤ Ë̦¤ÎÔÓØ˦ ÕÔÉ̦ÔÉ, ÐÏÔÒ¦ÂΦ ÄÌÑ ÍÏΦÔÏÒÉÎÇÕ UPS, ÄÏ
107 ÑËÏÇÏ Ë̦¤ÎÔÓØËÉÊ ÈÏÓÔ ÍÁ¤ ÄÏÓÔÕÐ, ÁÌÅ UPS ƦÚÉÞÎÏ Ð¦ÄËÌÀÞÅÎÉÊ ÄÏ
108 ¦ÎÛÏÇÏ ËÏÍÐ'ÀÔÅÒÕ × ÍÅÒÅÖ¦.
111 Summary: Multi-vendor UPS Monitoring Project Server - CGI utils
112 Summary(pl): Narzêdzia CGI do monitorowania UPS-ów
113 Summary(ru): Network UPS Tools - CGI ÕÔÉÌÉÔÙ
114 Summary(uk): Network UPS Tools - CGI ÕÔÉ̦ÔÉ
115 Group: Applications/System
116 Requires: %{name}-common = %{version}
119 These programs are part of a developing project to monitor the
120 assortment of UPSes that are found out there in the field. Many models
121 have serial serial ports of some kind that allow some form of state
122 checking. This capability has been harnessed where possible to allow
123 for safe shutdowns, live status tracking on web pages, and more. This
124 package contains CGI utils.
126 %description cgi -l pl
127 Te programy s± czê¶ci± projektu do monitorowania wielu UPS-ów w jakim¶
128 otoczeniu. Wiele modeli ma porty szeregowe i pozwala na jak±¶ formê
129 sprawdzania stanu. Ta funkcjonalno¶æ pozwala na bezpieczne
130 zatrzymywanie systemów, sprawdzanie stanu zasilania przez WWW i inne.
131 Ten pakiet zawiera narzêdzia CGI.
133 %description cgi -l ru
134 üÔÏÔ ÐÁËÅÔ ×ËÌÀÞÁÅÔ CGI ÐÒÏÇÒÁÍÍÙ ÄÌÑ ÄÏÓÔÕÐÁ Ë ÉÎÆÏÒÍÁÃÉÉ Ï ÓÔÁÔÕÓÅ
135 UPS ÞÅÒÅÚ ×ÅÂ-ÉÎÔÅÒÆÅÊÓ.
137 %description cgi -l uk
138 ãÅÊ ÐÁËÅÔ ×ËÌÀÞÁ¤ CGI ÐÒÏÇÒÁÍÉ ÄÌÑ ÄÏÓÔÕÐÕ ÄÏ ¦ÎÆÏÒÍÁæ§ ÐÒÏ ÓÔÁÔÕÓ
139 UPS ÞÅÒÅÚ ×ÅÂ-¦ÎÔÅÒÆÅÊÓ.
142 Summary: Files for NUT clients development
143 Summary(pl): Pliki do tworzenia klientów NUT-a
144 Group: Development/Libraries
145 Requires: openssl-devel >= 0.9.7
146 # it does NOT require nut
149 Object file and header for developing NUT clients.
151 %description devel -l pl
152 Plik wynikowy oraz nag³ówek s³u¿±ce do tworzenia klientów NUT-a.
158 %{!?_without_new_everups_driver:install %{SOURCE4} drivers/everups.c }
163 LDFLAGS="-L%{_prefix}/X11R6/lib"; export LDFLAGS
167 --with-linux-hiddev=%{_includedir}/linux/hiddev.h \
168 --with-statepath=%{_var}/lib/ups \
169 --with-drvpath=%{_libdir}/nut \
170 --with-cgipath=/home/services/httpd/cgi-bin \
176 rm -rf $RPM_BUILD_ROOT
177 install -d $RPM_BUILD_ROOT{/sbin,/etc/{sysconfig,rc.d/init.d},/var/lib/ups} \
178 $RPM_BUILD_ROOT{%{_libdir}/nut,%{_includedir}/nut}
180 %{__make} install install-cgi \
181 DESTDIR=$RPM_BUILD_ROOT
183 install %{SOURCE1} $RPM_BUILD_ROOT/etc/rc.d/init.d/ups
184 install %{SOURCE2} $RPM_BUILD_ROOT/etc/sysconfig/ups
185 install %{SOURCE3} $RPM_BUILD_ROOT/etc/rc.d/init.d/upsmon
187 rm -rf $RPM_BUILD_ROOT%{_sysconfdir}/*
188 install conf/*.users conf/*.conf conf/*.html $RPM_BUILD_ROOT%{_sysconfdir}
190 install clients/upsclient.o common/parseconf.o $RPM_BUILD_ROOT%{_libdir}
191 install clients/upsclient.h include/parseconf.h $RPM_BUILD_ROOT%{_includedir}/nut
193 cat > $RPM_BUILD_ROOT/sbin/poweroff-ups << EOF
195 /etc/rc.d/init.d/ups powerdown
199 rm -rf $RPM_BUILD_ROOT
202 if [ -n "`id -u ups 2>/dev/null`" ]; then
203 if [ "`id -u ups`" != "70" ]; then
204 echo "Error: user ups doesn't have uid=70. Correct this before installing %{name}." 1>&2
208 echo "Adding user ups UID=70."
209 /usr/sbin/useradd -u 70 -r -d /no/home -s /bin/false -c "UPS Manager User" -g nobody ups 1>&2
213 /sbin/chkconfig --add ups
214 if [ -f /var/lock/subsys/ups ]; then
215 /etc/rc.d/init.d/ups restart >&2
217 echo "Run \"/etc/rc.d/init.d/ups start\" to start NUT ups daemon."
221 /sbin/chkconfig --add upsmon
222 if [ -f /var/lock/subsys/upsmon ]; then
223 /etc/rc.d/init.d/upsmon restart >&2
225 echo "Run \"/etc/rc.d/init.d/upsmon start\" to start NUT upsmon daemon."
229 if [ "$1" = "0" ]; then
230 if [ -f /var/lock/subsys/ups ]; then
231 /etc/rc.d/init.d/ups stop >&2
233 /sbin/chkconfig --del ups
237 if [ "$1" = "0" ]; then
238 if [ -f /var/lock/subsys/upsmon ]; then
239 /etc/rc.d/init.d/upsmon stop >&2
241 /sbin/chkconfig --del upsmon
245 if [ "$1" = "0" ]; then
246 echo "Removing user ups."
247 /usr/sbin/userdel ups
251 %defattr(644,root,root,755)
252 %attr(755,root,root) %{_bindir}/upscmd
253 %attr(755,root,root) %{_bindir}/upslog
254 %attr(755,root,root) %{_bindir}/upsrw
255 %attr(755,root,root) %{_sbindir}/upsd
256 %attr(755,root,root) /sbin/poweroff-ups
257 %config(noreplace) %verify(not size mtime md5) /etc/sysconfig/ups
258 %attr(754,root,root) /etc/rc.d/init.d/ups
259 %attr(640,root,ttyS) %config(noreplace) %verify(not size mtime md5) %{_sysconfdir}/upsd.conf
260 %attr(640,root,ttyS) %config(noreplace) %verify(not size mtime md5) %{_sysconfdir}/ups.conf
261 %attr(640,root,ttyS) %config(noreplace) %verify(not size mtime md5) %{_sysconfdir}/upsd.users
262 %{_mandir}/man5/ups.conf.5*
263 %{_mandir}/man5/upsd.conf.5*
264 %{_mandir}/man5/upsd.users.5*
265 %{_mandir}/man8/[!u]*.8*
266 %{_mandir}/man8/upscmd.8*
267 %{_mandir}/man8/upsd.8*
268 %{_mandir}/man8/upsdrvctl.8*
269 %{_mandir}/man8/upslog.8*
270 %{_mandir}/man8/upsrw.8*
271 %dir %attr(750,ups,root) /var/lib/ups
273 %attr(755,root,root) %{_libdir}/nut/*
277 %defattr(644,root,root,755)
278 %doc NEWS README CHANGES CREDITS docs
282 %defattr(644,root,root,755)
283 %attr(755,root,root) %{_bindir}/upsc
284 %attr(755,root,root) %{_sbindir}/upsmon
285 %attr(755,root,root) %{_sbindir}/upssched
286 %attr(755,root,root) %{_sbindir}/upssched-cmd
287 %attr(754,root,root) /etc/rc.d/init.d/upsmon
288 %attr(600,root,root) %config(noreplace) %verify(not size mtime md5) %{_sysconfdir}/upsmon.conf
289 %attr(600,root,root) %config(noreplace) %verify(not size mtime md5) %{_sysconfdir}/upssched.conf
290 %{_mandir}/man5/upsmon.conf.5*
291 %{_mandir}/man5/upssched.conf.5*
292 %{_mandir}/man8/upsc.8*
293 %{_mandir}/man8/upsmon.8*
294 %{_mandir}/man8/upssched.8*
297 %defattr(644,root,root,755)
298 %attr(755,root,root) /home/services/httpd/cgi-bin/*.cgi
299 %config(noreplace) %verify(not size mtime md5) %{_sysconfdir}/hosts.conf
300 %config(noreplace) %verify(not size mtime md5) %{_sysconfdir}/upsset.conf
301 %config(noreplace) %verify(not size mtime md5) %{_sysconfdir}/*.html
302 %{_mandir}/man5/hosts.conf.5*
303 %{_mandir}/man5/upsset.conf.5*
304 %{_mandir}/man5/upsstats.html.5*
305 %{_mandir}/man8/upsimage.cgi.8*
306 %{_mandir}/man8/upsset.cgi.8*
307 %{_mandir}/man8/upsstats.cgi.8*
310 %defattr(644,root,root,755)
311 %{_libdir}/upsclient.o
312 %{_libdir}/parseconf.o