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