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.4/%{name}-%{version}.tar.gz
12 # Source0-md5: 1ddf547866db0f1eeb9c535ba0339906
14 Source2: %{name}.sysconfig
15 Source3: %{name}-upsmon.init
16 Patch0: %{name}-client.patch
17 Patch1: %{name}-datadir.patch
18 URL: http://www.exploits.org/nut/
19 BuildRequires: autoconf
20 BuildRequires: automake
21 BuildRequires: gd-devel >= 2.0.15
22 BuildRequires: libpng-devel
23 BuildRequires: openssl-devel >= 0.9.7
25 Requires(post,preun): /sbin/chkconfig
26 Requires: %{name}-common = %{version}
27 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
28 Obsoletes: smartupstools
30 %define _sysconfdir /etc/ups
33 These programs are part of a developing project to monitor the
34 assortment of UPSes that are found out there in the field. Many models
35 have serial serial ports of some kind that allow some form of state
36 checking. This capability has been harnessed where possible to allow
37 for safe shutdowns, live status tracking on web pages, and more.
40 Te programy s± czê¶ci± projektu do monitorowania wielu UPS-ów w jakim¶
41 otoczeniu. Wiele modeli ma porty szeregowe i pozwala na jak±¶ formê
42 sprawdzania stanu. Ta funkcjonalno¶æ pozwala na bezpieczne
43 zatrzymywanie systemów, sprawdzanie stanu zasilania przez WWW i inne.
46 üÔÉ ÐÒÏÇÒÁÍÍÙ - ÞÁÓÔØ ÐÒÏÅËÔÁ ÐÏ ÍÏÎÉÔÏÒÉÎÇÕ ÒÁÚÌÉÞÎÙÈ UPS. õ ÍÎÏÇÉÈ
47 ÍÏÄÅÌÅÊ ÅÓÔØ ÓÅÒÉÁÌØÎÙÅ ÐÏÒÔÙ, ÐÏÚ×ÏÌÑÀÝÉÅ ÐÒÏ×ÅÒÑÔØ ÓÏÓÔÏÑÎÉÅ ÜÔÉÈ
48 UPS. üÔÁ ×ÏÚÍÏÖÎÏÓÔØ ÂÙÌÁ ÉÓÐÏÌØÚÏ×ÁÎÁ, ÇÄÅ ÜÔÏ ×ÏÚÍÏÖÎÏ, ÄÌÑ
49 ×ÙÐÏÌÎÅÎÉÑ ÂÅÚÏÐÁÓÎÙÈ ÏÓÔÁÎÏ×Ï× ËÏÍÐØÀÔÅÒÏ×, ÏÔÓÌÅÖÉ×ÁÎÉÑ ÓÔÁÔÕÓÁ
53 㦠ÐÒÏÇÒÁÍÉ ¤ ÞÁÓÔÉÎÏÀ ÐÒÏÅËÔÕ ÐÏ ÍÏΦÔÏÒÉÎÇÕ Ò¦ÚÎÏÍÁΦÔÎÉÈ UPS.
54 âÁÇÁÔÏ ÍÏÄÅÌÅÊ ÍÁÀÔØ ÓÅÒ¦ÁÌØΦ ÐÏÒÔÉ, ÝÏ ÄÏÚ×ÏÌÑÔØ ÐÅÒÅצÒÑÔÉ ÓÔÁÎ ÃÉÈ
55 UPS. ãÑ ÍÏÖÌÉצÓÔØ ÂÕÌÁ ×ÉËÏÒÉÓÔÁÎÁ, ÄÅ ÃÅ ÍÏÖÌÉ×Ï, ÄÌÑ ×ÉËÏÎÁÎÎÑ
56 ÂÅÚÐÅÞÎÉÈ ÚÕÐÉÎÏË ËÏÍÐ'ÀÔÅÒ¦×, צÄÓ̦ÄËÏ×Õ×ÁÎÎÑ ÓÔÁÔÕÓÕ ÞÅÒÅÚ ×ÅÂ,
60 Summary: Package with common files for nut daemon and its clients
61 Summary(pl): Pakiet z plikami wspólnymi dla demona nut i jego klientów
62 Group: Applications/System
65 Package with common files for nut daemon and its clients.
67 %description common -l pl
68 Pakiet z plikami wspólnymi dla demona nut i jego klientów.
71 Summary: Multi-vendor UPS Monitoring Project Client Utilities
72 Summary(pl): Narzêdzia klienckie do monitorowania UPS-ów
73 Summary(uk): Network UPS Tools - Ë̦¤ÎÔÓØ˦ ÕÔÉ̦ÔÉ ÍÏΦÔÏÒÉÎÇÕ
74 Summary(ru): Network UPS Tools - ËÌÉÅÎÔÓËÉÅ ÕÔÉÌÉÔÙ ÍÏÎÉÔÏÒÉÎÇÁ
75 Group: Applications/System
77 Requires(post,preun): /sbin/chkconfig
78 Requires: %{name}-common = %{version}
81 This package includes the client utilities that are required to
82 monitor a UPS that the client host is plugged into but monitored via
83 serial cable by another host on the network....
85 %description client -l pl
86 Ten pakiet zawiera narzêdzia kliencie potrzebne do monitorowania UPS-a
87 do którego pod³±czony jest komputer kliencki, kiedy kabel szeregowy
88 UPS-a jest pod³±czony do innego komputera w sieci.
90 %description client -l ru
91 üÔÏÔ ÐÁËÅÔ ×ËÌÀÞÁÅÔ ËÌÉÅÎÔÓËÉÅ ÕÔÉÌÉÔÙ, ÎÅÏÂÈÏÄÉÍÙÅ ÄÌÑ ÍÏÎÉÔÏÒÉÎÇÁ
92 UPS, Ë ËÏÔÏÒÏÍÕ ËÌÉÅÎÔÓËÉÊ ÈÏÓÔ ÉÍÅÅÔ ÄÏÓÔÕÐ, ÎÏ UPS ÆÉÚÉÞÅÓËÉ
93 ÐÏÄËÌÀÞÅÎ Ë ÄÒÕÇÏÍÕ ËÏÍÐØÀÔÅÒÕ × ÓÅÔÉ.
95 %description client -l uk
96 ãÅÊ ÐÁËÅÔ ×ËÌÀÞÁ¤ Ë̦¤ÎÔÓØ˦ ÕÔÉ̦ÔÉ, ÐÏÔÒ¦ÂΦ ÄÌÑ ÍÏΦÔÏÒÉÎÇÕ UPS, ÄÏ
97 ÑËÏÇÏ Ë̦¤ÎÔÓØËÉÊ ÈÏÓÔ ÍÁ¤ ÄÏÓÔÕÐ, ÁÌÅ UPS ƦÚÉÞÎÏ Ð¦ÄËÌÀÞÅÎÉÊ ÄÏ
98 ¦ÎÛÏÇÏ ËÏÍÐ'ÀÔÅÒÕ × ÍÅÒÅÖ¦.
101 Summary: Multi-vendor UPS Monitoring Project Server - CGI utils
102 Summary(pl): Narzêdzia CGI do monitorowania UPS-ów
103 Summary(ru): Network UPS Tools - CGI ÕÔÉÌÉÔÙ
104 Summary(uk): Network UPS Tools - CGI ÕÔÉ̦ÔÉ
105 Group: Applications/System
106 Requires: %{name}-common = %{version}
109 These programs are part of a developing project to monitor the
110 assortment of UPSes that are found out there in the field. Many models
111 have serial serial ports of some kind that allow some form of state
112 checking. This capability has been harnessed where possible to allow
113 for safe shutdowns, live status tracking on web pages, and more. This
114 package contains CGI utils.
116 %description cgi -l pl
117 Te programy s± czê¶ci± projektu do monitorowania wielu UPS-ów w jakim¶
118 otoczeniu. Wiele modeli ma porty szeregowe i pozwala na jak±¶ formê
119 sprawdzania stanu. Ta funkcjonalno¶æ pozwala na bezpieczne
120 zatrzymywanie systemów, sprawdzanie stanu zasilania przez WWW i inne.
121 Ten pakiet zawiera narzêdzia CGI.
123 %description cgi -l ru
124 üÔÏÔ ÐÁËÅÔ ×ËÌÀÞÁÅÔ CGI ÐÒÏÇÒÁÍÍÙ ÄÌÑ ÄÏÓÔÕÐÁ Ë ÉÎÆÏÒÍÁÃÉÉ Ï ÓÔÁÔÕÓÅ
125 UPS ÞÅÒÅÚ ×ÅÂ-ÉÎÔÅÒÆÅÊÓ.
127 %description cgi -l uk
128 ãÅÊ ÐÁËÅÔ ×ËÌÀÞÁ¤ CGI ÐÒÏÇÒÁÍÉ ÄÌÑ ÄÏÓÔÕÐÕ ÄÏ ¦ÎÆÏÒÍÁæ§ ÐÒÏ ÓÔÁÔÕÓ
129 UPS ÞÅÒÅÚ ×ÅÂ-¦ÎÔÅÒÆÅÊÓ.
132 Summary: Files for NUT clients development
133 Summary(pl): Pliki do tworzenia klientów NUT-a
134 Group: Development/Libraries
135 Requires: openssl-devel >= 0.9.7
136 # it does NOT require nut
139 Object file and header for developing NUT clients.
141 %description devel -l pl
142 Plik wynikowy oraz nag³ówek s³u¿±ce do tworzenia klientów NUT-a.
152 LDFLAGS="-L%{_prefix}/X11R6/lib"; export LDFLAGS
156 --with-linux-hiddev=%{_includedir}/linux/hiddev.h \
157 --with-statepath=%{_var}/lib/ups \
158 --with-drvpath=%{_libdir}/nut \
159 --with-cgipath=/home/services/httpd/cgi-bin \
165 rm -rf $RPM_BUILD_ROOT
166 install -d $RPM_BUILD_ROOT{/sbin,/etc/{sysconfig,rc.d/init.d},/var/lib/ups} \
167 $RPM_BUILD_ROOT{%{_libdir}/nut,%{_includedir}}
169 %{__make} install install-cgi \
170 DESTDIR=$RPM_BUILD_ROOT
172 install %{SOURCE1} $RPM_BUILD_ROOT/etc/rc.d/init.d/ups
173 install %{SOURCE2} $RPM_BUILD_ROOT/etc/sysconfig/ups
174 install %{SOURCE3} $RPM_BUILD_ROOT/etc/rc.d/init.d/upsmon
176 rm -rf $RPM_BUILD_ROOT%{_sysconfdir}/*
177 install conf/*.users conf/*.conf conf/*.html $RPM_BUILD_ROOT%{_sysconfdir}
179 install clients/upsclient.o $RPM_BUILD_ROOT%{_libdir}
180 install clients/upsclient.h $RPM_BUILD_ROOT%{_includedir}
182 cat > $RPM_BUILD_ROOT/sbin/poweroff-ups << EOF
184 /etc/rc.d/init.d/ups powerdown
188 rm -rf $RPM_BUILD_ROOT
191 /sbin/chkconfig --add ups
192 if [ -f /var/lock/subsys/ups ]; then
193 /etc/rc.d/init.d/ups restart >&2
195 echo "Run \"/etc/rc.d/init.d/ups start\" to start NUT ups daemon."
199 /sbin/chkconfig --add upsmon
200 if [ -f /var/lock/subsys/upsmon ]; then
201 /etc/rc.d/init.d/upsmon restart >&2
203 echo "Run \"/etc/rc.d/init.d/upsmon start\" to start NUT upsmon daemon."
207 if [ "$1" = "0" ]; then
208 if [ -f /var/lock/subsys/ups ]; then
209 /etc/rc.d/init.d/ups stop >&2
211 /sbin/chkconfig --del ups
215 if [ "$1" = "0" ]; then
216 if [ -f /var/lock/subsys/upsmon ]; then
217 /etc/rc.d/init.d/upsmon stop >&2
219 /sbin/chkconfig --del upsmon
223 %defattr(644,root,root,755)
224 %attr(755,root,root) %{_bindir}/upscmd
225 %attr(755,root,root) %{_bindir}/upslog
226 %attr(755,root,root) %{_bindir}/upsrw
227 %attr(755,root,root) %{_sbindir}/upsd
228 %attr(755,root,root) /sbin/poweroff-ups
229 %config(noreplace) %verify(not size mtime md5) /etc/sysconfig/ups
230 %attr(754,root,root) /etc/rc.d/init.d/ups
231 %attr(640,root,nobody) %config(noreplace) %verify(not size mtime md5) %{_sysconfdir}/upsd.conf
232 %attr(640,root,nobody) %config(noreplace) %verify(not size mtime md5) %{_sysconfdir}/ups.conf
233 %attr(640,root,nobody) %config(noreplace) %verify(not size mtime md5) %{_sysconfdir}/upsd.users
234 %{_mandir}/man5/ups.conf.5*
235 %{_mandir}/man5/upsd.conf.5*
236 %{_mandir}/man5/upsd.users.5*
237 %{_mandir}/man8/[!u]*.8*
238 %{_mandir}/man8/upscmd.8*
239 %{_mandir}/man8/upsd.8*
240 %{_mandir}/man8/upsdrvctl.8*
241 %{_mandir}/man8/upslog.8*
242 %{_mandir}/man8/upsrw.8*
243 %dir %attr(750,nobody,root) /var/lib/ups
245 %attr(755,root,root) %{_libdir}/nut/*
249 %defattr(644,root,root,755)
250 %doc NEWS README CHANGES CREDITS docs
254 %defattr(644,root,root,755)
255 %attr(755,root,root) %{_bindir}/upsc
256 %attr(755,root,root) %{_sbindir}/upsmon
257 %attr(755,root,root) %{_sbindir}/upssched
258 %attr(755,root,root) %{_sbindir}/upssched-cmd
259 %attr(754,root,root) /etc/rc.d/init.d/upsmon
260 %attr(600,root,root) %config(noreplace) %verify(not size mtime md5) %{_sysconfdir}/upsmon.conf
261 %attr(600,root,root) %config(noreplace) %verify(not size mtime md5) %{_sysconfdir}/upssched.conf
262 %{_mandir}/man5/upsmon.conf.5*
263 %{_mandir}/man5/upssched.conf.5*
264 %{_mandir}/man8/upsc.8*
265 %{_mandir}/man8/upsmon.8*
266 %{_mandir}/man8/upssched.8*
269 %defattr(644,root,root,755)
270 %attr(755,root,root) /home/services/httpd/cgi-bin/*.cgi
271 %config(noreplace) %verify(not size mtime md5) %{_sysconfdir}/hosts.conf
272 %config(noreplace) %verify(not size mtime md5) %{_sysconfdir}/upsset.conf
273 %config(noreplace) %verify(not size mtime md5) %{_sysconfdir}/*.html
274 %{_mandir}/man5/hosts.conf.5*
275 %{_mandir}/man5/upsset.conf.5*
276 %{_mandir}/man5/upsstats.html.5*
277 %{_mandir}/man8/upsimage.cgi.8*
278 %{_mandir}/man8/upsset.cgi.8*
279 %{_mandir}/man8/upsstats.cgi.8*
282 %defattr(644,root,root,755)
283 %{_libdir}/upsclient.o
284 %{_includedir}/upsclient.h