3 # /usr/html/{{bottom,header,index}.html,nut-banner.png}
4 # /etc/udev/rules.d/52_nut-usbups.rules
6 # - upsdrvctl (used by ups.init) doesn't recognize status and reload commands
10 %bcond_without usb # build without usb drivers
11 %bcond_without hal # build without hal support
12 %bcond_without snmp # build without snmp driver
14 Summary: Network UPS Tools
15 Summary(pl.UTF-8): Sieciowe narzędzie do UPS-ów
20 Group: Applications/System
21 Source0: http://eu1.networkupstools.org/source/2.2/%{name}-%{version}.tar.gz
22 # Source0-md5: a3570515d80804051d4e7631e8a3eb12
24 Source2: %{name}.sysconfig
25 Source3: %{name}-upsmon.init
26 Source4: %{name}.sysconfig.upsmon
27 Patch0: %{name}-client.patch
28 Patch1: %{name}-config.patch
29 Patch2: %{name}-smartdp-load.patch
30 URL: http://www.networkupstools.org/
31 BuildRequires: autoconf
32 BuildRequires: automake
33 BuildRequires: gd-devel >= 2.0.15
34 BuildRequires: libpng-devel
35 BuildRequires: net-snmp-devel
36 BuildRequires: openssl-devel >= 0.9.7d
37 BuildRequires: rpmbuild(macros) >= 1.268
38 BuildRequires: xorg-lib-libXpm-devel
39 Requires(post,preun): /sbin/chkconfig
40 Requires: %{name}-common = %{version}-%{release}
42 Obsoletes: smartupstools
43 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
45 %define _sysconfdir /etc/ups
48 These programs are part of a developing project to monitor the
49 assortment of UPSes that are found out there in the field. Many models
50 have serial serial ports of some kind that allow some form of state
51 checking. This capability has been harnessed where possible to allow
52 for safe shutdowns, live status tracking on web pages, and more.
54 %description -l pl.UTF-8
55 Te programy są częścią projektu do monitorowania wielu UPS-ów w jakimś
56 otoczeniu. Wiele modeli ma porty szeregowe i pozwala na jakąś formę
57 sprawdzania stanu. Ta funkcjonalność pozwala na bezpieczne
58 zatrzymywanie systemów, sprawdzanie stanu zasilania przez WWW i inne.
60 %description -l ru.UTF-8
61 Эти программы - часть проекта по мониторингу различных UPS. У многих
62 моделей есть сериальные порты, позволяющие проверять состояние этих
63 UPS. Эта возможность была использована, где это возможно, для
64 выполнения безопасных остановов компьютеров, отслеживания статуса
67 %description -l uk.UTF-8
68 Ці програми є частиною проекту по моніторингу різноманітних UPS.
69 Багато моделей мають серіальні порти, що дозволять перевіряти стан цих
70 UPS. Ця можливість була використана, де це можливо, для виконання
71 безпечних зупинок комп'ютерів, відслідковування статусу через веб,
75 Summary: Package with common files for nut daemon and its clients
76 Summary(pl.UTF-8): Pakiet z plikami wspólnymi dla demona nut i jego klientów
77 Group: Applications/System
78 Requires(postun): /usr/sbin/groupdel
79 Requires(postun): /usr/sbin/userdel
80 Requires(pre): /bin/id
81 Requires(pre): /usr/bin/getgid
82 Requires(pre): /usr/sbin/groupadd
83 Requires(pre): /usr/sbin/groupmod
84 Requires(pre): /usr/sbin/useradd
89 Package with common files for nut daemon and its clients.
91 %description common -l pl.UTF-8
92 Pakiet z plikami wspólnymi dla demona nut i jego klientów.
95 Summary: Multi-vendor UPS Monitoring Project Client Utilities
96 Summary(pl.UTF-8): Narzędzia klienckie do monitorowania UPS-ów
97 Summary(ru.UTF-8): Network UPS Tools - клиентские утилиты мониторинга
98 Summary(uk.UTF-8): Network UPS Tools - клієнтські утиліти моніторингу
99 Group: Applications/System
100 Requires(post,preun): /sbin/chkconfig
101 Requires: %{name}-common = %{version}-%{release}
105 This package includes the client utilities that are required to
106 monitor a UPS that the client host is plugged into but monitored via
107 serial cable by another host on the network....
109 %description client -l pl.UTF-8
110 Ten pakiet zawiera narzędzia kliencie potrzebne do monitorowania UPS-a
111 do którego podłączony jest komputer kliencki, kiedy kabel szeregowy
112 UPS-a jest podłączony do innego komputera w sieci.
114 %description client -l ru.UTF-8
115 Этот пакет включает клиентские утилиты, необходимые для мониторинга
116 UPS, к которому клиентский хост имеет доступ, но UPS физически
117 подключен к другому компьютеру в сети.
119 %description client -l uk.UTF-8
120 Цей пакет включає клієнтські утиліти, потрібні для моніторингу UPS, до
121 якого клієнтський хост має доступ, але UPS фізично підключений до
122 іншого комп'ютеру в мережі.
125 Summary: Multi-vendor UPS Monitoring Project Server - CGI utils
126 Summary(pl.UTF-8): Narzędzia CGI do monitorowania UPS-ów
127 Summary(ru.UTF-8): Network UPS Tools - CGI утилиты
128 Summary(uk.UTF-8): Network UPS Tools - CGI утиліти
129 Group: Applications/System
130 Requires: %{name}-common = %{version}-%{release}
133 These programs are part of a developing project to monitor the
134 assortment of UPSes that are found out there in the field. Many models
135 have serial serial ports of some kind that allow some form of state
136 checking. This capability has been harnessed where possible to allow
137 for safe shutdowns, live status tracking on web pages, and more. This
138 package contains CGI utils.
140 %description cgi -l pl.UTF-8
141 Te programy są częścią projektu do monitorowania wielu UPS-ów w jakimś
142 otoczeniu. Wiele modeli ma porty szeregowe i pozwala na jakąś formę
143 sprawdzania stanu. Ta funkcjonalność pozwala na bezpieczne
144 zatrzymywanie systemów, sprawdzanie stanu zasilania przez WWW i inne.
145 Ten pakiet zawiera narzędzia CGI.
147 %description cgi -l ru.UTF-8
148 Этот пакет включает CGI программы для доступа к информации о статусе
149 UPS через веб-интерфейс.
151 %description cgi -l uk.UTF-8
152 Цей пакет включає CGI програми для доступу до інформації про статус
153 UPS через веб-інтерфейс.
156 Summary: Files for NUT clients development
157 Summary(pl.UTF-8): Pliki do tworzenia klientów NUT-a
158 Group: Development/Libraries
159 Requires: openssl-devel >= 0.9.7c
160 # it does NOT require nut
163 Object file and header for developing NUT clients.
165 %description devel -l pl.UTF-8
166 Plik wynikowy oraz nagłówek służące do tworzenia klientów NUT-a.
175 cp -f /usr/share/automake/config.sub .
180 --datadir=%{_datadir}/%{name} \
181 %{?with_hal:--with-hal} \
182 %{!?with_hal:--without-hal} \
184 %{?with_snmp:--with-snmp} \
185 %{!?with_snmp:--without-snmp} \
186 %{?with_usb:--with-usb} \
187 %{!?with_usb:--without-usb} \
190 --with-linux-hiddev=%{_includedir}/linux/hiddev.h \
191 --with-statepath=%{_var}/lib/ups \
192 --with-drvpath=/lib/nut \
193 --with-cgipath=/home/services/httpd/cgi-bin \
199 rm -rf $RPM_BUILD_ROOT
200 install -d $RPM_BUILD_ROOT{/sbin,/etc/{sysconfig,rc.d/init.d},/var/lib/ups} \
201 $RPM_BUILD_ROOT{/lib/nut,%{_libdir},%{_includedir}/nut}
204 DESTDIR=$RPM_BUILD_ROOT
206 install %{SOURCE1} $RPM_BUILD_ROOT/etc/rc.d/init.d/ups
207 install %{SOURCE2} $RPM_BUILD_ROOT/etc/sysconfig/ups
208 install %{SOURCE3} $RPM_BUILD_ROOT/etc/rc.d/init.d/upsmon
209 install %{SOURCE4} $RPM_BUILD_ROOT/etc/sysconfig/upsmon
211 rm -rf $RPM_BUILD_ROOT%{_sysconfdir}/*
212 install conf/upsd.users.sample $RPM_BUILD_ROOT%{_sysconfdir}/upsd.users
213 install conf/hosts.conf.sample $RPM_BUILD_ROOT%{_sysconfdir}/hosts.conf
214 install conf/ups.conf.sample $RPM_BUILD_ROOT%{_sysconfdir}/ups.conf
215 install conf/upsd.conf.sample $RPM_BUILD_ROOT%{_sysconfdir}/upsd.conf
216 install conf/upsmon.conf.sample $RPM_BUILD_ROOT%{_sysconfdir}/upsmon.conf
217 install conf/upssched.conf.sample $RPM_BUILD_ROOT%{_sysconfdir}/upssched.conf
218 install conf/upsset.conf.sample $RPM_BUILD_ROOT%{_sysconfdir}/upsset.conf
219 install conf/upsstats.html.sample $RPM_BUILD_ROOT%{_sysconfdir}/upsstats.html
220 install conf/upsstats-single.html.sample $RPM_BUILD_ROOT%{_sysconfdir}/upsstats-single.html
222 install clients/upsclient.o common/parseconf.o $RPM_BUILD_ROOT%{_libdir}
223 install clients/upsclient.h include/parseconf.h $RPM_BUILD_ROOT%{_includedir}/nut
225 cat > $RPM_BUILD_ROOT/sbin/poweroff-ups << EOF
227 /etc/rc.d/init.d/ups powerdown
231 rm -rf $RPM_BUILD_ROOT
234 /sbin/chkconfig --add ups
235 %service ups restart "NUT ups daemon"
238 if [ "$1" = "0" ]; then
240 /sbin/chkconfig --del ups
245 if [ -n "`/usr/bin/getgid ups`" ] && [ "`/usr/bin/getgid ups`" = 121 ]; then
246 /usr/sbin/groupmod -g 76 ups
247 chgrp ups %{_sysconfdir}/{upsd.conf,ups.conf,upsd.users}
248 /usr/sbin/usermod -g 76 ups
251 %useradd -u 70 -d /usr/share/empty -s /bin/false -c "UPS Manager User" -g ups ups
254 /sbin/chkconfig --add upsmon
255 %service upsmon restart "NUT upsmon daemon"
258 if [ "$1" = "0" ]; then
260 /sbin/chkconfig --del upsmon
264 if [ "$1" = "0" ]; then
270 %defattr(644,root,root,755)
271 %attr(755,root,root) %{_bindir}/upscmd
272 %attr(755,root,root) %{_bindir}/upslog
273 %attr(755,root,root) %{_bindir}/upsrw
274 %attr(755,root,root) %{_sbindir}/upsd
275 %attr(755,root,root) /sbin/poweroff-ups
276 %config(noreplace) %verify(not md5 mtime size) /etc/sysconfig/ups
277 %attr(754,root,root) /etc/rc.d/init.d/ups
278 %attr(640,root,ups) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/upsd.conf
279 %attr(640,root,ups) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/ups.conf
280 %attr(640,root,ups) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/upsd.users
281 %{_mandir}/man5/ups.conf.5*
282 %{_mandir}/man5/upsd.conf.5*
283 %{_mandir}/man5/upsd.users.5*
284 %{_mandir}/man8/upscmd.8*
285 %{_mandir}/man8/upscode2.8*
286 %{_mandir}/man8/upsd.8*
287 %{_mandir}/man8/upsdrvctl.8*
288 %{_mandir}/man8/upslog.8*
289 %{_mandir}/man8/upsrw.8*
290 %dir %attr(770,root,ups) /var/lib/ups
292 %attr(755,root,root) /lib/nut/al175
293 %attr(755,root,root) /lib/nut/apcsmart
294 %attr(755,root,root) /lib/nut/bcmxcp
295 %{?with_usb:%attr(755,root,root) /lib/nut/bcmxcp_usb}
296 %attr(755,root,root) /lib/nut/belkin
297 %attr(755,root,root) /lib/nut/belkinunv
298 %attr(755,root,root) /lib/nut/bestfcom
299 %attr(755,root,root) /lib/nut/bestuferrups
300 %attr(755,root,root) /lib/nut/bestups
301 %attr(755,root,root) /lib/nut/cpsups
302 %attr(755,root,root) /lib/nut/cyberpower
303 %attr(755,root,root) /lib/nut/dummy-ups
304 %{?with_usb:%attr(755,root,root) /lib/nut/energizerups}
305 %attr(755,root,root) /lib/nut/etapro
306 %attr(755,root,root) /lib/nut/everups
307 %attr(755,root,root) /lib/nut/gamatronic
308 %attr(755,root,root) /lib/nut/genericups
310 %attr(755,root,root) /lib/nut/hald-addon-bcmxcp_usb
311 %attr(755,root,root) /lib/nut/hald-addon-megatec_usb
312 %attr(755,root,root) /lib/nut/hald-addon-tripplite_usb
313 %attr(755,root,root) /lib/nut/hald-addon-usbhid-ups
315 %attr(755,root,root) /lib/nut/isbmex
316 %attr(755,root,root) /lib/nut/liebert
317 %attr(755,root,root) /lib/nut/masterguard
318 %attr(755,root,root) /lib/nut/megatec
319 %{?with_usb:%attr(755,root,root) /lib/nut/megatec_usb}
320 %attr(755,root,root) /lib/nut/metasys
321 %attr(755,root,root) /lib/nut/mge-shut
322 %attr(755,root,root) /lib/nut/mge-utalk
323 %attr(755,root,root) /lib/nut/newmge-shut
324 %attr(755,root,root) /lib/nut/nitram
325 %attr(755,root,root) /lib/nut/oneac
326 %attr(755,root,root) /lib/nut/optiups
327 %attr(755,root,root) /lib/nut/powercom
328 %attr(755,root,root) /lib/nut/powerpanel
329 %attr(755,root,root) /lib/nut/rhino
330 %attr(755,root,root) /lib/nut/safenet
331 %attr(755,root,root) /lib/nut/skel
332 %{?with_snmp:%attr(755,root,root) /lib/nut/snmp-ups}
333 %attr(755,root,root) /lib/nut/solis
334 %attr(755,root,root) /lib/nut/tripplite
335 %attr(755,root,root) /lib/nut/tripplitesu
336 %{?with_usb:%attr(755,root,root) /lib/nut/tripplite_usb}
337 %attr(755,root,root) /lib/nut/upscode2
338 %attr(755,root,root) /lib/nut/upsdrvctl
339 %{?with_usb:%attr(755,root,root) /lib/nut/usbhid-ups}
340 %attr(755,root,root) /lib/nut/victronups
342 %{_mandir}/man8/al175.8*
343 %{_mandir}/man8/apcsmart.8*
344 %{_mandir}/man8/bcmxcp.8*
345 %{?with_usb:%{_mandir}/man8/bcmxcp_usb.8*}
346 %{_mandir}/man8/belkin.8*
347 %{_mandir}/man8/belkinunv.8*
348 %{_mandir}/man8/bestfcom.8*
349 %{_mandir}/man8/bestuferrups.8*
350 %{_mandir}/man8/bestups.8*
351 %{_mandir}/man8/cpsups.8*
352 %{_mandir}/man8/cyberpower.8*
353 %{_mandir}/man8/dummy-ups.8*
354 %{?with_usb:%{_mandir}/man8/energizerups.8*}
355 %{_mandir}/man8/etapro.8*
356 %{_mandir}/man8/everups.8*
357 %{_mandir}/man8/gamatronic.8*
358 %{_mandir}/man8/genericups.8*
359 %{_mandir}/man8/isbmex.8*
360 %{_mandir}/man8/liebert.8*
361 %{_mandir}/man8/masterguard.8*
362 %{_mandir}/man8/megatec.8*
363 %{?with_usb:%{_mandir}/man8/megatec_usb.8*}
364 %{_mandir}/man8/metasys.8*
365 %{_mandir}/man8/mge-shut.8*
366 %{_mandir}/man8/mge-utalk.8*
367 %{_mandir}/man8/nitram.8*
368 %{_mandir}/man8/nutupsdrv.8*
369 %{_mandir}/man8/oneac.8*
370 %{_mandir}/man8/optiups.8*
371 %{_mandir}/man8/powercom.8*
372 %{_mandir}/man8/powerpanel.8*
373 %{_mandir}/man8/rhino.8*
374 %{_mandir}/man8/safenet.8*
375 %{?with_snmp:%{_mandir}/man8/snmp-ups.8*}
376 %{_mandir}/man8/solis.8*
377 %{_mandir}/man8/tripplite.8*
378 %{_mandir}/man8/tripplitesu.8*
379 %{?with_usb:%{_mandir}/man8/tripplite_usb.8*}
380 %{?with_usb:%{_mandir}/man8/usbhid-ups.8*}
381 %{_mandir}/man8/victronups.8*
384 %defattr(644,root,root,755)
385 %doc AUTHORS MAINTAINERS NEWS README UPGRADING ChangeLog docs
389 %defattr(644,root,root,755)
390 %attr(755,root,root) %{_bindir}/upsc
391 %attr(755,root,root) %{_sbindir}/upsmon
392 %attr(755,root,root) %{_sbindir}/upssched
393 %attr(755,root,root) %{_sbindir}/upssched-cmd
394 %attr(754,root,root) /etc/rc.d/init.d/upsmon
395 %attr(640,root,ups) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/upsmon.conf
396 %attr(640,root,ups) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/upssched.conf
397 %config(noreplace) %verify(not md5 mtime size) /etc/sysconfig/upsmon
398 %{_mandir}/man5/upsmon.conf.5*
399 %{_mandir}/man5/upssched.conf.5*
400 %{_mandir}/man8/upsc.8*
401 %{_mandir}/man8/upsmon.8*
402 %{_mandir}/man8/upssched.8*
405 %defattr(644,root,root,755)
406 %attr(755,root,root) /home/services/httpd/cgi-bin/*.cgi
407 %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/hosts.conf
408 %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/upsset.conf
409 %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/*.html
410 %{_mandir}/man5/hosts.conf.5*
411 %{_mandir}/man5/upsset.conf.5*
412 %{_mandir}/man5/upsstats.html.5*
413 %{_mandir}/man8/upsimage.cgi.8*
414 %{_mandir}/man8/upsset.cgi.8*
415 %{_mandir}/man8/upsstats.cgi.8*
418 %defattr(644,root,root,755)
419 %{_libdir}/upsclient.o
420 %{_libdir}/parseconf.o