]> git.pld-linux.org Git - packages/nut.git/blob - nut.spec
- trying to get nut working with Fideltronik Ares, need testing
[packages/nut.git] / nut.spec
1 Summary:        Network UPS Tools
2 Summary(pl):    Sieciowe narzêdzie do UPS-ów
3 Summary(ru):    NUT - Network UPS Tools
4 Summary(uk):    NUT - Network UPS Tools
5 Name:           nut
6 Version:        1.0.0
7 Release:        1.1
8 License:        GPL
9 Group:          Applications/System
10 Source0:        http://www.exploits.org/nut/release/%{name}-%{version}.tar.gz
11 Source1:        %{name}.init
12 Source2:        %{name}.sysconfig
13 Source3:        %{name}-upsmon.init
14 Patch0:         %{name}-DESTDIR.patch
15 Patch1:         %{name}-client.patch
16 Patch2:         %{name}-fideltronik.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 Prereq:         rc-scripts
23 Prereq:         /sbin/chkconfig
24 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
25 Obsoletes:      smartupstools
26
27 %define         _sysconfdir     /etc/ups
28
29 %description
30 These programs are part of a developing project to monitor the
31 assortment of UPSes that are found out there in the field. Many models
32 have serial serial ports of some kind that allow some form of state
33 checking. This capability has been harnessed where possible to allow
34 for safe shutdowns, live status tracking on web pages, and more.
35
36 %description -l pl
37 Te programy s± czê¶ci± projektu do monitorowania wielu UPS-ów w jakim¶
38 otoczeniu. Wiele modeli ma porty szeregowe i pozwala na jak±¶ formê
39 sprawdzania stanu. Ta funkcjonalno¶æ pozwala na bezpieczne
40 zatrzymywanie systemów, sprawdzanie stanu zasilania przez WWW i inne.
41
42 %description -l ru
43 üÔÉ ÐÒÏÇÒÁÍÍÙ - ÞÁÓÔØ ÐÒÏÅËÔÁ ÐÏ ÍÏÎÉÔÏÒÉÎÇÕ ÒÁÚÌÉÞÎÙÈ UPS. õ ÍÎÏÇÉÈ
44 ÍÏÄÅÌÅÊ ÅÓÔØ ÓÅÒÉÁÌØÎÙÅ ÐÏÒÔÙ, ÐÏÚ×ÏÌÑÀÝÉÅ ÐÒÏ×ÅÒÑÔØ ÓÏÓÔÏÑÎÉÅ ÜÔÉÈ
45 UPS. üÔÁ ×ÏÚÍÏÖÎÏÓÔØ ÂÙÌÁ ÉÓÐÏÌØÚÏ×ÁÎÁ, ÇÄÅ ÜÔÏ ×ÏÚÍÏÖÎÏ, ÄÌÑ
46 ×ÙÐÏÌÎÅÎÉÑ ÂÅÚÏÐÁÓÎÙÈ ÏÓÔÁÎÏ×Ï× ËÏÍÐØÀÔÅÒÏ×, ÏÔÓÌÅÖÉ×ÁÎÉÑ ÓÔÁÔÕÓÁ
47 ÞÅÒÅÚ ×Å ɠÔ.Ð.
48
49 %description -l uk
50 㦠ÐÒÏÇÒÁÍÉ ¤ ÞÁÓÔÉÎÏÀ ÐÒÏÅËÔÕ ÐÏ ÍÏΦÔÏÒÉÎÇÕ Ò¦ÚÎÏÍÁΦÔÎÉÈ UPS.
51 âÁÇÁÔÏ ÍÏÄÅÌÅÊ ÍÁÀÔØ ÓÅÒ¦ÁÌØΦ ÐÏÒÔÉ, ÝÏ ÄÏÚ×ÏÌÑÔØ ÐÅÒÅצÒÑÔÉ ÓÔÁΠÃÉÈ
52 UPS. ãÑ ÍÏÖÌÉצÓÔØ ÂÕÌÁ ×ÉËÏÒÉÓÔÁÎÁ, ÄÅ ÃÅ ÍÏÖÌÉ×Ï, ÄÌÑ ×ÉËÏÎÁÎÎÑ
53 ÂÅÚÐÅÞÎÉÈ ÚÕÐÉÎÏË ËÏÍÐ'ÀÔÅÒ¦×, ×¦ÄÓ̦ÄËÏ×Õ×ÁÎÎÑ ÓÔÁÔÕÓÕ ÞÅÒÅÚ ×ÅÂ,
54 ÔÏÝÏ.
55
56 %package client
57 Summary:        Multi-vendor UPS Monitoring Project Client Utilities
58 Summary(pl):    Narzêdzia klienckie do monitorowania UPS-ów
59 Summary(uk):    Network UPS Tools - Ë̦¤ÎÔÓØ˦ ÕÔÉ̦ÔÉ ÍÏΦÔÏÒÉÎÇÕ
60 Summary(ru):    Network UPS Tools - ËÌÉÅÎÔÓËÉÅ ÕÔÉÌÉÔÙ ÍÏÎÉÔÏÒÉÎÇÁ
61 Group:          Applications/System
62 Prereq:         rc-scripts
63 Prereq:         /sbin/chkconfig
64
65 %description client
66 This package includes the client utilities that are required to
67 monitor a UPS that the client host is plugged into but monitored via
68 serial cable by another host on the network....
69
70 %description client -l pl
71 Ten pakiet zawiera narzêdzia kliencie potrzebne do monitorowania UPS-a
72 do którego pod³±czony jest komputer kliencki, kiedy kabel szeregowy
73 UPS-a jest pod³±czony do innego komputera w sieci.
74
75 %description client -l ru
76 üÔÏÔ ÐÁËÅÔ ×ËÌÀÞÁÅÔ ËÌÉÅÎÔÓËÉÅ ÕÔÉÌÉÔÙ, ÎÅÏÂÈÏÄÉÍÙÅ ÄÌÑ ÍÏÎÉÔÏÒÉÎÇÁ
77 UPS, Ë ËÏÔÏÒÏÍÕ ËÌÉÅÎÔÓËÉÊ ÈÏÓÔ ÉÍÅÅÔ ÄÏÓÔÕÐ, ÎÏ UPS ÆÉÚÉÞÅÓËÉ
78 ÐÏÄËÌÀÞÅΠˠÄÒÕÇÏÍÕ ËÏÍÐØÀÔÅÒÕ × ÓÅÔÉ.
79
80 %description client -l uk
81 ãÅÊ ÐÁËÅÔ ×ËÌÀÞÁ¤ Ë̦¤ÎÔÓØ˦ ÕÔÉ̦ÔÉ, ÐÏÔÒ¦ÂΦ ÄÌÑ ÍÏΦÔÏÒÉÎÇÕ UPS, ÄÏ
82 ÑËÏÇÏ Ë̦¤ÎÔÓØËÉÊ ÈÏÓÔ ÍÁ¤ ÄÏÓÔÕÐ, ÁÌÅ UPS Æ¦ÚÉÞÎϠЦÄËÌÀÞÅÎÉÊ ÄÏ
83 ¦ÎÛÏÇÏ ËÏÍÐ'ÀÔÅÒÕ × ÍÅÒÅÖ¦.
84
85 %package cgi
86 Summary:        Multi-vendor UPS Monitoring Project Server - CGI utils
87 Summary(pl):    Narzêdzia CGI do monitorowania UPS-ów
88 Summary(ru):    Network UPS Tools - CGI ÕÔÉÌÉÔÙ
89 Summary(uk):    Network UPS Tools - CGI ÕÔÉ̦ÔÉ
90 Group:          Applications/System
91
92 %description cgi
93 These programs are part of a developing project to monitor the
94 assortment of UPSes that are found out there in the field. Many models
95 have serial serial ports of some kind that allow some form of state
96 checking. This capability has been harnessed where possible to allow
97 for safe shutdowns, live status tracking on web pages, and more. This
98 package contains CGI utils.
99
100 %description cgi -l pl
101 Te programy s± czê¶ci± projektu do monitorowania wielu UPS-ów w jakim¶
102 otoczeniu. Wiele modeli ma porty szeregowe i pozwala na jak±¶ formê
103 sprawdzania stanu. Ta funkcjonalno¶æ pozwala na bezpieczne
104 zatrzymywanie systemów, sprawdzanie stanu zasilania przez WWW i inne.
105 Ten pakiet zawiera narzêdzia CGI.
106
107 %description cgi -l ru
108 üÔÏÔ ÐÁËÅÔ ×ËÌÀÞÁÅÔ CGI ÐÒÏÇÒÁÍÍÙ ÄÌÑ ÄÏÓÔÕÐÁ Ë ÉÎÆÏÒÍÁÃÉÉ Ï ÓÔÁÔÕÓÅ
109 UPS ÞÅÒÅÚ ×ÅÂ-ÉÎÔÅÒÆÅÊÓ.
110
111 %description cgi -l uk
112 ãÅÊ ÐÁËÅÔ ×ËÌÀÞÁ¤ CGI ÐÒÏÇÒÁÍÉ ÄÌÑ ÄÏÓÔÕÐÕ ÄÏ ¦ÎÆÏÒÍÁ槠ÐÒÏ ÓÔÁÔÕÓ
113 UPS ÞÅÒÅÚ ×ÅÂ-¦ÎÔÅÒÆÅÊÓ.
114
115 %package devel
116 Summary:        Files for NUT clients development
117 Summary(pl):    Pliki do tworzenia klientów NUT-a
118 Group:          Development/Libraries
119 # it does NOT require nut
120
121 %description devel
122 Object file and header for developing NUT clients.
123
124 %description devel -l pl
125 Plik wynikowy oraz nag³ówek s³u¿±ce do tworzenia klientów NUT-a.
126
127 %prep
128 %setup -q
129 %patch0 -p1
130 %patch1 -p1
131 %patch2 -p1
132
133 %build
134 install %{_datadir}/automake/config.* .
135 %{__aclocal}
136 %{__autoconf}
137 %configure \
138         --with-cgi \
139         --with-linux-hiddev=%{_includedir}/linux/hiddev.h \
140         --with-statepath=%{_var}/lib/ups \
141         --with-drvpath=%{_libdir}/nut \
142         --with-cgipath=/home/services/httpd/cgi-bin \
143         --with-user=nobody \
144         --with-group=ttyS
145 %{__make} all cgi
146
147 %install
148 rm -rf $RPM_BUILD_ROOT
149 install -d $RPM_BUILD_ROOT/{etc/{sysconfig,rc.d/init.d},/var/lib/ups} \
150         $RPM_BUILD_ROOT{%{_libdir}/nut,%{_includedir}}
151
152 %{__make} install install-cgi \
153         DESTDIR=$RPM_BUILD_ROOT
154
155 install %{SOURCE1} $RPM_BUILD_ROOT/etc/rc.d/init.d/ups
156 install %{SOURCE2} $RPM_BUILD_ROOT/etc/sysconfig/ups
157 install %{SOURCE3} $RPM_BUILD_ROOT/etc/rc.d/init.d/upsmon
158
159 rm -rf $RPM_BUILD_ROOT%{_sysconfdir}/*
160 install conf/*.users conf/*.conf $RPM_BUILD_ROOT%{_sysconfdir}
161
162 install clients/upsfetch.o $RPM_BUILD_ROOT%{_libdir}
163 install clients/upsfetch.h $RPM_BUILD_ROOT%{_includedir}
164
165 ln -s %{_libdir}/nut/upsdrvctl $RPM_BUILD_ROOT%{_sbindir}
166
167 %clean
168 rm -rf $RPM_BUILD_ROOT
169
170 %post
171 /sbin/chkconfig --add ups
172 if [ -f /var/lock/subsys/ups ]; then
173         /etc/rc.d/init.d/ups restart >&2
174 else
175         echo "Run \"/etc/rc.d/init.d/ups start\" to start NUT ups daemon."
176 fi
177
178 %post client
179 /sbin/chkconfig --add upsmon
180 if [ -f /var/lock/subsys/upsmon ]; then
181         /etc/rc.d/init.d/upsmon restart >&2
182 else
183         echo "Run \"/etc/rc.d/init.d/upsmon start\" to start NUT upsmon daemon."
184 fi
185
186 %preun
187 if [ "$1" = "0" ]; then
188         if [ -f /var/lock/subsys/ups ]; then
189                 /etc/rc.d/init.d/ups stop >&2
190         fi
191         /sbin/chkconfig --del ups
192 fi
193
194 %preun client
195 if [ "$1" = "0" ]; then
196         if [ -f /var/lock/subsys/upsmon ]; then
197                 /etc/rc.d/init.d/upsmon stop >&2
198         fi
199         /sbin/chkconfig --del upsmon
200 fi
201
202 %files
203 %defattr(644,root,root,755)
204 %doc NEWS README CHANGES CREDITS docs/*
205 %attr(755,root,root) %{_bindir}/upscmd
206 %attr(755,root,root) %{_bindir}/upslog
207 %attr(755,root,root) %{_sbindir}/upsdrvctl
208 %attr(755,root,root) %{_sbindir}/upsd
209 %config(noreplace) /etc/sysconfig/ups
210 %attr(754,root,root) /etc/rc.d/init.d/ups
211 %attr(640,root,root) %config(noreplace) %{_sysconfdir}/upsd.conf
212 %attr(640,root,nobody) %config(noreplace) %{_sysconfdir}/ups.conf
213 %attr(640,root,root) %config(noreplace) %{_sysconfdir}/upsd.users
214 %{_mandir}/man5/*
215 %{_mandir}/man8/*
216 %dir %attr(750,nobody,root) /var/lib/ups
217 %dir %attr(755,root,root) %{_libdir}/nut
218 %attr(755,root,root) %{_libdir}/nut/*
219
220 %files client
221 %defattr(644,root,root,755)
222 %attr(755,root,root) %{_bindir}/upsc
223 %attr(755,root,root) %{_bindir}/upsct
224 %attr(755,root,root) %{_bindir}/upsct2
225 %attr(755,root,root) %{_sbindir}/upsmon
226 %attr(755,root,root) %{_sbindir}/upssched
227 %attr(755,root,root) %{_sbindir}/upssched-cmd
228 %attr(754,root,root) /etc/rc.d/init.d/upsmon
229 %attr(600,root,root) %config(noreplace) %{_sysconfdir}/upsmon.conf
230 %attr(600,root,root) %config(noreplace) %{_sysconfdir}/upssched.conf
231
232 %files cgi
233 %defattr(644,root,root,755)
234 %attr(755,root,root) /home/services/httpd/cgi-bin/*.cgi
235 %config(noreplace) %{_sysconfdir}/hosts.conf
236 %config(noreplace) %{_sysconfdir}/multimon.conf
237 %config(noreplace) %{_sysconfdir}/upsset.conf
238
239 %files devel
240 %defattr(644,root,root,755)
241 %{_libdir}/upsfetch.o
242 %{_includedir}/upsfetch.h
This page took 0.08124 seconds and 3 git commands to generate.