1 Summary: Network UPS Tools
2 Summary(pl): Sieciowe narzêdzie do UPS-ów
7 Group: Applications/System
8 Source0: http://www.exploits.org/nut/release/%{name}-%{version}.tar.gz
10 Source2: %{name}.sysconfig
11 Source3: %{name}-upsmon.init
12 Patch0: %{name}-DESTDIR.patch
13 Patch1: %{name}-client.patch
14 Patch2: %{name}-lookup_for_libgd_ac_fix.patch
15 URL: http://www.exploits.org/nut/
16 BuildRequires: autoconf
17 BuildRequires: gd-devel >= 2.0.1
18 BuildRequires: libpng-devel
20 Prereq: /sbin/chkconfig
21 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
22 Obsoletes: smartupstools
24 %define _sysconfdir /etc/ups
27 These programs are part of a developing project to monitor the
28 assortment of UPSes that are found out there in the field. Many models
29 have serial serial ports of some kind that allow some form of state
30 checking. This capability has been harnessed where possible to allow
31 for safe shutdowns, live status tracking on web pages, and more.
34 Te programy s± czê¶ci± projektu do monitorowania wielu UPS-ów w jakim¶
35 otoczeniu. Wiele modeli ma porty szeregowe i pozwala na jak±¶ formê
36 sprawdzania stanu. Ta funkcjonalno¶æ pozwala na bezpieczne
37 zatrzymywanie systemów, sprawdzanie stanu zasilania przez WWW i inne.
40 Summary: Multi-vendor UPS Monitoring Project Client Utilities
41 Summary(pl): Narzêdzia klienckie do monitorowania UPS-ów
42 Group: Applications/System
44 Prereq: /sbin/chkconfig
47 This package includes the client utilities that are required to
48 monitor a UPS that the client host is plugged into but monitored via
49 serial cable by another host on the network....
51 %description client -l pl
52 Ten pakiet zawiera narzêdzia kliencie potrzebne do monitorowania UPS-a
53 do którego pod³±czony jest komputer kliencki, kiedy kabel szeregowy
54 UPS-a jest pod³±czony do innego komputera w sieci.
57 Summary: Multi-vendor UPS Monitoring Project Server - CGI utils
58 Summary(pl): Narzêdzia CGI do monitorowania UPS-ów
59 Group: Applications/System
62 These programs are part of a developing project to monitor the
63 assortment of UPSes that are found out there in the field. Many models
64 have serial serial ports of some kind that allow some form of state
65 checking. This capability has been harnessed where possible to allow
66 for safe shutdowns, live status tracking on web pages, and more. This
67 package contains CGI utils.
69 %description cgi -l pl
70 Te programy s± czê¶ci± projektu do monitorowania wielu UPS-ów w jakim¶
71 otoczeniu. Wiele modeli ma porty szeregowe i pozwala na jak±¶ formê
72 sprawdzania stanu. Ta funkcjonalno¶æ pozwala na bezpieczne
73 zatrzymywanie systemów, sprawdzanie stanu zasilania przez WWW i inne.
74 Ten pakiet zawiera narzêdzia CGI.
77 Summary: Files for NUT clients development
78 Summary(pl): Pliki do tworzenia klientów NUT-a
79 Group: Development/Libraries
80 # it does NOT require nut
83 Object file and header for developing NUT clients.
85 %description devel -l pl
86 Plik wynikowy oraz nag³ówek s³u¿±ce do tworzenia klientów NUT-a.
97 --with-statepath=/var/lib/ups \
100 --with-modelpath=%{_libdir}/nut
104 rm -rf $RPM_BUILD_ROOT
105 install -d $RPM_BUILD_ROOT/{etc/{sysconfig,rc.d/init.d},/var/lib/ups} \
106 $RPM_BUILD_ROOT{%{_libdir}/nut,%{_includedir}}
109 DESTDIR=$RPM_BUILD_ROOT \
110 CGIPATH=/home/httpd/cgi-bin
112 install %{SOURCE1} $RPM_BUILD_ROOT/etc/rc.d/init.d/ups
113 install %{SOURCE2} $RPM_BUILD_ROOT/etc/sysconfig/ups
114 install %{SOURCE3} $RPM_BUILD_ROOT/etc/rc.d/init.d/upsmon
115 install conf/ups.conf $RPM_BUILD_ROOT%{_sysconfdir}/ups.conf
117 install clients/upsfetch.o $RPM_BUILD_ROOT%{_libdir}
118 install clients/upsfetch.h $RPM_BUILD_ROOT%{_includedir}
120 gzip -9nf CREDITS README docs/{FAQ,Changes*,*.txt,cables/*}
123 rm -rf $RPM_BUILD_ROOT
126 #if [ -n "`id -u ups 2>/dev/null`" ]; then
127 # if [ "`id -u ups`" != "68" ]; then
128 # echo "Warning: user ups does not have uid=68. Correct this before installing NUT" 1>&2
132 # /usr/sbin/useradd -u 68 -r -d /var/lib/ups -s /bin/sh -c "Network UPS Tools User" -g ttyS ups 1>&2
136 /sbin/chkconfig --add ups
137 if [ -f /var/lock/subsys/ups ]; then
138 /etc/rc.d/init.d/ups restart >&2
140 echo "Run \"/etc/rc.d/init.d/ups start\" to start NUT ups daemon."
144 /sbin/chkconfig --add upsmon
145 if [ -f /var/lock/subsys/upsmon ]; then
146 /etc/rc.d/init.d/upsmon restart >&2
148 echo "Run \"/etc/rc.d/init.d/upsmon start\" to start NUT upsmon daemon."
152 if [ "$1" = "0" ]; then
153 if [ -f /var/lock/subsys/ups ]; then
154 /etc/rc.d/init.d/ups stop >&2
156 /sbin/chkconfig --del ups
160 #if [ "$1" = "0" ]; then
165 if [ "$1" = "0" ]; then
166 if [ -f /var/lock/subsys/upsmon ]; then
167 /etc/rc.d/init.d/upsmon stop >&2
169 /sbin/chkconfig --del upsmon
173 %defattr(644,root,root,755)
174 %doc *.gz docs/{,cables}/*.gz
175 %attr(755,root,root) %{_bindir}/upscmd
176 %attr(755,root,root) %{_sbindir}/upsd
177 %attr(755,root,root) %{_bindir}/upslog
178 %config(noreplace) /etc/sysconfig/ups
179 %attr(754,root,root) /etc/rc.d/init.d/ups
180 %attr(640,root,root) %config(noreplace) %{_sysconfdir}/upsd.conf
181 %attr(640,root,root) %config(noreplace) %{_sysconfdir}/ups.conf
182 %attr(640,root,root) %config(noreplace) %{_sysconfdir}/upsd.users
185 %dir %attr(750,nobody,root) /var/lib/ups
186 %dir %attr(755,root,root) %{_libdir}/nut
187 %attr(755,root,root) %{_libdir}/nut/*
190 %defattr(644,root,root,755)
191 %attr(755,root,root) %{_bindir}/upsc
192 %attr(755,root,root) %{_bindir}/upsct
193 %attr(755,root,root) %{_bindir}/upsct2
194 %attr(755,root,root) %{_sbindir}/upsmon
195 %attr(755,root,root) %{_sbindir}/upssched
196 %attr(755,root,root) %{_sbindir}/upssched-cmd
197 %attr(754,root,root) /etc/rc.d/init.d/upsmon
198 %attr(600,root,root) %config(noreplace) %{_sysconfdir}/upsmon.conf
199 %attr(600,root,root) %config(noreplace) %{_sysconfdir}/upssched.conf
202 %defattr(644,root,root,755)
203 %attr(755,root,root) /home/httpd/cgi-bin/*.cgi
204 %config(noreplace) %{_sysconfdir}/hosts.conf
205 %config(noreplace) %{_sysconfdir}/multimon.conf
206 %config(noreplace) %{_sysconfdir}/upsset.conf
209 %defattr(644,root,root,755)
210 %{_libdir}/upsfetch.o
211 %{_includedir}/upsfetch.h