1 # TODO: /var/lib/ups dir ownership (shouldn't be nobody)
2 Summary: Network UPS Tools
3 Summary(pl): Sieciowe narzêdzie do UPS-ów
4 Summary(ru): NUT - Network UPS Tools
5 Summary(uk): NUT - Network UPS Tools
10 Group: Applications/System
11 Source0: http://penguin.harrison.k12.co.us/mirrors/nut/release/1.2/%{name}-%{version}.tar.gz
12 # Source0-md5: 87dd831a819d06904cbe06e70dcf3c2f
14 Source2: %{name}.sysconfig
15 Source3: %{name}-upsmon.init
16 Patch0: %{name}-client.patch
17 URL: http://www.exploits.org/nut/
18 BuildRequires: autoconf
19 BuildRequires: automake
20 BuildRequires: gd-devel >= 2.0.1
21 BuildRequires: libpng-devel
22 BuildRequires: openssl-devel >= 0.9.7
24 Requires(post,preun): /sbin/chkconfig
25 Requires: %{name}-common = %{version}
26 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
27 Obsoletes: smartupstools
29 %define _sysconfdir /etc/ups
32 These programs are part of a developing project to monitor the
33 assortment of UPSes that are found out there in the field. Many models
34 have serial serial ports of some kind that allow some form of state
35 checking. This capability has been harnessed where possible to allow
36 for safe shutdowns, live status tracking on web pages, and more.
39 Te programy s± czê¶ci± projektu do monitorowania wielu UPS-ów w jakim¶
40 otoczeniu. Wiele modeli ma porty szeregowe i pozwala na jak±¶ formê
41 sprawdzania stanu. Ta funkcjonalno¶æ pozwala na bezpieczne
42 zatrzymywanie systemów, sprawdzanie stanu zasilania przez WWW i inne.
45 üÔÉ ÐÒÏÇÒÁÍÍÙ - ÞÁÓÔØ ÐÒÏÅËÔÁ ÐÏ ÍÏÎÉÔÏÒÉÎÇÕ ÒÁÚÌÉÞÎÙÈ UPS. õ ÍÎÏÇÉÈ
46 ÍÏÄÅÌÅÊ ÅÓÔØ ÓÅÒÉÁÌØÎÙÅ ÐÏÒÔÙ, ÐÏÚ×ÏÌÑÀÝÉÅ ÐÒÏ×ÅÒÑÔØ ÓÏÓÔÏÑÎÉÅ ÜÔÉÈ
47 UPS. üÔÁ ×ÏÚÍÏÖÎÏÓÔØ ÂÙÌÁ ÉÓÐÏÌØÚÏ×ÁÎÁ, ÇÄÅ ÜÔÏ ×ÏÚÍÏÖÎÏ, ÄÌÑ
48 ×ÙÐÏÌÎÅÎÉÑ ÂÅÚÏÐÁÓÎÙÈ ÏÓÔÁÎÏ×Ï× ËÏÍÐØÀÔÅÒÏ×, ÏÔÓÌÅÖÉ×ÁÎÉÑ ÓÔÁÔÕÓÁ
52 㦠ÐÒÏÇÒÁÍÉ ¤ ÞÁÓÔÉÎÏÀ ÐÒÏÅËÔÕ ÐÏ ÍÏΦÔÏÒÉÎÇÕ Ò¦ÚÎÏÍÁΦÔÎÉÈ UPS.
53 âÁÇÁÔÏ ÍÏÄÅÌÅÊ ÍÁÀÔØ ÓÅÒ¦ÁÌØΦ ÐÏÒÔÉ, ÝÏ ÄÏÚ×ÏÌÑÔØ ÐÅÒÅצÒÑÔÉ ÓÔÁÎ ÃÉÈ
54 UPS. ãÑ ÍÏÖÌÉצÓÔØ ÂÕÌÁ ×ÉËÏÒÉÓÔÁÎÁ, ÄÅ ÃÅ ÍÏÖÌÉ×Ï, ÄÌÑ ×ÉËÏÎÁÎÎÑ
55 ÂÅÚÐÅÞÎÉÈ ÚÕÐÉÎÏË ËÏÍÐ'ÀÔÅÒ¦×, צÄÓ̦ÄËÏ×Õ×ÁÎÎÑ ÓÔÁÔÕÓÕ ÞÅÒÅÚ ×ÅÂ,
59 Summary: Package with common files for nut daemon and its clients
60 Summary(pl): Pakiet z plikami wspólnymi dla demona nut i jego klientów
61 Group: Applications/System
64 Package with common files for nut daemon and its clients.
66 %description common -l pl
67 Pakiet z plikami wspólnymi dla demona nut i jego klientów.
70 Summary: Multi-vendor UPS Monitoring Project Client Utilities
71 Summary(pl): Narzêdzia klienckie do monitorowania UPS-ów
72 Summary(uk): Network UPS Tools - Ë̦¤ÎÔÓØ˦ ÕÔÉ̦ÔÉ ÍÏΦÔÏÒÉÎÇÕ
73 Summary(ru): Network UPS Tools - ËÌÉÅÎÔÓËÉÅ ÕÔÉÌÉÔÙ ÍÏÎÉÔÏÒÉÎÇÁ
74 Group: Applications/System
76 Requires(post,preun): /sbin/chkconfig
77 Requires: %{name}-common = %{version}
80 This package includes the client utilities that are required to
81 monitor a UPS that the client host is plugged into but monitored via
82 serial cable by another host on the network....
84 %description client -l pl
85 Ten pakiet zawiera narzêdzia kliencie potrzebne do monitorowania UPS-a
86 do którego pod³±czony jest komputer kliencki, kiedy kabel szeregowy
87 UPS-a jest pod³±czony do innego komputera w sieci.
89 %description client -l ru
90 üÔÏÔ ÐÁËÅÔ ×ËÌÀÞÁÅÔ ËÌÉÅÎÔÓËÉÅ ÕÔÉÌÉÔÙ, ÎÅÏÂÈÏÄÉÍÙÅ ÄÌÑ ÍÏÎÉÔÏÒÉÎÇÁ
91 UPS, Ë ËÏÔÏÒÏÍÕ ËÌÉÅÎÔÓËÉÊ ÈÏÓÔ ÉÍÅÅÔ ÄÏÓÔÕÐ, ÎÏ UPS ÆÉÚÉÞÅÓËÉ
92 ÐÏÄËÌÀÞÅÎ Ë ÄÒÕÇÏÍÕ ËÏÍÐØÀÔÅÒÕ × ÓÅÔÉ.
94 %description client -l uk
95 ãÅÊ ÐÁËÅÔ ×ËÌÀÞÁ¤ Ë̦¤ÎÔÓØ˦ ÕÔÉ̦ÔÉ, ÐÏÔÒ¦ÂΦ ÄÌÑ ÍÏΦÔÏÒÉÎÇÕ UPS, ÄÏ
96 ÑËÏÇÏ Ë̦¤ÎÔÓØËÉÊ ÈÏÓÔ ÍÁ¤ ÄÏÓÔÕÐ, ÁÌÅ UPS ƦÚÉÞÎÏ Ð¦ÄËÌÀÞÅÎÉÊ ÄÏ
97 ¦ÎÛÏÇÏ ËÏÍÐ'ÀÔÅÒÕ × ÍÅÒÅÖ¦.
100 Summary: Multi-vendor UPS Monitoring Project Server - CGI utils
101 Summary(pl): Narzêdzia CGI do monitorowania UPS-ów
102 Summary(ru): Network UPS Tools - CGI ÕÔÉÌÉÔÙ
103 Summary(uk): Network UPS Tools - CGI ÕÔÉ̦ÔÉ
104 Group: Applications/System
105 Requires: %{name}-common = %{version}
108 These programs are part of a developing project to monitor the
109 assortment of UPSes that are found out there in the field. Many models
110 have serial serial ports of some kind that allow some form of state
111 checking. This capability has been harnessed where possible to allow
112 for safe shutdowns, live status tracking on web pages, and more. This
113 package contains CGI utils.
115 %description cgi -l pl
116 Te programy s± czê¶ci± projektu do monitorowania wielu UPS-ów w jakim¶
117 otoczeniu. Wiele modeli ma porty szeregowe i pozwala na jak±¶ formê
118 sprawdzania stanu. Ta funkcjonalno¶æ pozwala na bezpieczne
119 zatrzymywanie systemów, sprawdzanie stanu zasilania przez WWW i inne.
120 Ten pakiet zawiera narzêdzia CGI.
122 %description cgi -l ru
123 üÔÏÔ ÐÁËÅÔ ×ËÌÀÞÁÅÔ CGI ÐÒÏÇÒÁÍÍÙ ÄÌÑ ÄÏÓÔÕÐÁ Ë ÉÎÆÏÒÍÁÃÉÉ Ï ÓÔÁÔÕÓÅ
124 UPS ÞÅÒÅÚ ×ÅÂ-ÉÎÔÅÒÆÅÊÓ.
126 %description cgi -l uk
127 ãÅÊ ÐÁËÅÔ ×ËÌÀÞÁ¤ CGI ÐÒÏÇÒÁÍÉ ÄÌÑ ÄÏÓÔÕÐÕ ÄÏ ¦ÎÆÏÒÍÁæ§ ÐÒÏ ÓÔÁÔÕÓ
128 UPS ÞÅÒÅÚ ×ÅÂ-¦ÎÔÅÒÆÅÊÓ.
131 Summary: Files for NUT clients development
132 Summary(pl): Pliki do tworzenia klientów NUT-a
133 Group: Development/Libraries
134 Requires: openssl-devel >= 0.9.7
135 # it does NOT require nut
138 Object file and header for developing NUT clients.
140 %description devel -l pl
141 Plik wynikowy oraz nag³ówek s³u¿±ce do tworzenia klientów NUT-a.
150 LDFLAGS="-L%{_prefix}/X11R6/lib"; export LDFLAGS
154 --with-linux-hiddev=%{_includedir}/linux/hiddev.h \
155 --with-statepath=%{_var}/lib/ups \
156 --with-drvpath=%{_libdir}/nut \
157 --with-cgipath=/home/services/httpd/cgi-bin \
163 rm -rf $RPM_BUILD_ROOT
164 install -d $RPM_BUILD_ROOT{/sbin,/etc/{sysconfig,rc.d/init.d},/var/lib/ups} \
165 $RPM_BUILD_ROOT{%{_libdir}/nut,%{_includedir}}
167 %{__make} install install-cgi \
168 DESTDIR=$RPM_BUILD_ROOT
170 install %{SOURCE1} $RPM_BUILD_ROOT/etc/rc.d/init.d/ups
171 install %{SOURCE2} $RPM_BUILD_ROOT/etc/sysconfig/ups
172 install %{SOURCE3} $RPM_BUILD_ROOT/etc/rc.d/init.d/upsmon
174 rm -rf $RPM_BUILD_ROOT%{_sysconfdir}/*
175 install conf/*.users conf/*.conf conf/*.html $RPM_BUILD_ROOT%{_sysconfdir}
177 install clients/upsclient.o $RPM_BUILD_ROOT%{_libdir}
178 install clients/upsclient.h $RPM_BUILD_ROOT%{_includedir}
180 cat > $RPM_BUILD_ROOT/sbin/poweroff-ups << EOF
182 /etc/rc.d/init.d/ups powerdown
186 rm -rf $RPM_BUILD_ROOT
189 /sbin/chkconfig --add ups
190 if [ -f /var/lock/subsys/ups ]; then
191 /etc/rc.d/init.d/ups restart >&2
193 echo "Run \"/etc/rc.d/init.d/ups start\" to start NUT ups daemon."
197 /sbin/chkconfig --add upsmon
198 if [ -f /var/lock/subsys/upsmon ]; then
199 /etc/rc.d/init.d/upsmon restart >&2
201 echo "Run \"/etc/rc.d/init.d/upsmon start\" to start NUT upsmon daemon."
205 if [ "$1" = "0" ]; then
206 if [ -f /var/lock/subsys/ups ]; then
207 /etc/rc.d/init.d/ups stop >&2
209 /sbin/chkconfig --del ups
213 if [ "$1" = "0" ]; then
214 if [ -f /var/lock/subsys/upsmon ]; then
215 /etc/rc.d/init.d/upsmon stop >&2
217 /sbin/chkconfig --del upsmon
221 %defattr(644,root,root,755)
222 %attr(755,root,root) %{_bindir}/upscmd
223 %attr(755,root,root) %{_bindir}/upslog
224 %attr(755,root,root) %{_bindir}/upsrw
225 %attr(755,root,root) %{_sbindir}/upsd
226 %attr(755,root,root) /sbin/poweroff-ups
227 %config(noreplace) %verify(not size mtime md5) /etc/sysconfig/ups
228 %attr(754,root,root) /etc/rc.d/init.d/ups
229 %attr(640,root,root) %config(noreplace) %verify(not size mtime md5) %{_sysconfdir}/upsd.conf
230 %attr(640,root,nobody) %config(noreplace) %verify(not size mtime md5) %{_sysconfdir}/ups.conf
231 %attr(640,root,root) %config(noreplace) %verify(not size mtime md5) %{_sysconfdir}/upsd.users
232 %{_mandir}/man5/ups.conf.5*
233 %{_mandir}/man5/upsd.conf.5*
234 %{_mandir}/man5/upsd.users.5*
235 %{_mandir}/man8/[!u]*.8*
236 %{_mandir}/man8/upscmd.8*
237 %{_mandir}/man8/upsd.8*
238 %{_mandir}/man8/upsdrvctl.8*
239 %{_mandir}/man8/upslog.8*
240 %{_mandir}/man8/upsrw.8*
241 %dir %attr(750,nobody,root) /var/lib/ups
243 %attr(755,root,root) %{_libdir}/nut/*
246 %defattr(644,root,root,755)
247 %doc NEWS README CHANGES CREDITS docs
251 %defattr(644,root,root,755)
252 %attr(755,root,root) %{_bindir}/upsc
253 %attr(755,root,root) %{_sbindir}/upsmon
254 %attr(755,root,root) %{_sbindir}/upssched
255 %attr(755,root,root) %{_sbindir}/upssched-cmd
256 %attr(754,root,root) /etc/rc.d/init.d/upsmon
257 %attr(600,root,root) %config(noreplace) %verify(not size mtime md5) %{_sysconfdir}/upsmon.conf
258 %attr(600,root,root) %config(noreplace) %verify(not size mtime md5) %{_sysconfdir}/upssched.conf
259 %{_mandir}/man5/upsmon.conf.5*
260 %{_mandir}/man5/upssched.conf.5*
261 %{_mandir}/man8/upsc.8*
262 %{_mandir}/man8/upsmon.8*
263 %{_mandir}/man8/upssched.8*
266 %defattr(644,root,root,755)
267 %attr(755,root,root) /home/services/httpd/cgi-bin/*.cgi
268 %config(noreplace) %verify(not size mtime md5) %{_sysconfdir}/hosts.conf
269 %config(noreplace) %verify(not size mtime md5) %{_sysconfdir}/upsset.conf
270 %config(noreplace) %verify(not size mtime md5) %{_sysconfdir}/*.html
271 %{_mandir}/man5/hosts.conf.5*
272 %{_mandir}/man5/upsset.conf.5*
273 %{_mandir}/man5/upsstats.html.5*
274 %{_mandir}/man8/upsimage.cgi.8*
275 %{_mandir}/man8/upsset.cgi.8*
276 %{_mandir}/man8/upsstats.cgi.8*
279 %defattr(644,root,root,755)
280 %{_libdir}/upsclient.o
281 %{_includedir}/upsclient.h