]>
Commit | Line | Data |
---|---|---|
1 | # TODO: | |
2 | # - upsdrvctl (used by ups.init) doesn't recognize status and reload commands | |
3 | # | |
4 | # Conditional build: | |
5 | %bcond_without usb # build without usb drivers | |
6 | %bcond_with hal # build with hal support (DEPRECATED) | |
7 | %bcond_without snmp # build without snmp driver | |
8 | %bcond_without cgi # build without cgi support | |
9 | %bcond_without neon # build with neon based XML/HTTP driver | |
10 | # | |
11 | Summary: Network UPS Tools | |
12 | Summary(pl.UTF-8): Sieciowe narzędzie do UPS-ów | |
13 | Name: nut | |
14 | Version: 2.6.5 | |
15 | Release: 2 | |
16 | License: GPL | |
17 | Group: Applications/System | |
18 | Source0: http://www.networkupstools.org/source/2.6/%{name}-%{version}.tar.gz | |
19 | # Source0-md5: e6eac4fa04baff0d0a827d64efe81a7e | |
20 | Source1: %{name}.init | |
21 | Source2: %{name}.sysconfig | |
22 | Source3: %{name}-upsmon.init | |
23 | Source4: %{name}.sysconfig.upsmon | |
24 | Patch0: %{name}-client.patch | |
25 | Patch1: %{name}-config.patch | |
26 | Patch2: %{name}-smartdp-load.patch | |
27 | Patch3: %{name}-upssched-cmd-sysconf.patch | |
28 | Patch4: %{name}-matrix.patch | |
29 | Patch5: systemd-sysconfig.patch | |
30 | Patch6: bcmxcp-off-by-one.patch | |
31 | Patch7: nut-2.6.5-ipmifix.patch | |
32 | Patch8: nut-2.6.5-pthreadfix.patch | |
33 | Patch9: nut-2.6.5-unreachable.patch | |
34 | URL: http://www.networkupstools.org/ | |
35 | BuildRequires: autoconf | |
36 | BuildRequires: automake | |
37 | BuildRequires: avahi-devel | |
38 | %{?with_hal:BuildRequires: dbus-glib-devel} | |
39 | BuildRequires: freeipmi-devel | |
40 | %{?with_cgi:BuildRequires: gd-devel >= 2.0.15} | |
41 | %{?with_hal:BuildRequires: hal-devel >= 0.5.8} | |
42 | BuildRequires: libltdl-devel | |
43 | BuildRequires: libtool | |
44 | %{?with_usb:BuildRequires: libusb-compat-devel} | |
45 | BuildRequires: libwrap-devel | |
46 | %{?with_neon:BuildRequires: neon-devel} | |
47 | %{?with_snmp:BuildRequires: net-snmp-devel} | |
48 | BuildRequires: openssl-devel >= 0.9.7d | |
49 | BuildRequires: pkgconfig | |
50 | BuildRequires: rpmbuild(macros) >= 1.647 | |
51 | Requires: systemd-units >= 38 | |
52 | Requires(post,preun): /sbin/chkconfig | |
53 | Requires: %{name}-common = %{version}-%{release} | |
54 | Requires: rc-scripts | |
55 | Obsoletes: smartupstools | |
56 | BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) | |
57 | ||
58 | %define _sysconfdir /etc/ups | |
59 | %define _udevrulesdir /etc/udev/rules.d | |
60 | ||
61 | %description | |
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. | |
67 | ||
68 | %description -l pl.UTF-8 | |
69 | Te programy są częścią projektu do monitorowania wielu UPS-ów w jakimś | |
70 | otoczeniu. Wiele modeli ma porty szeregowe i pozwala na jakąś formę | |
71 | sprawdzania stanu. Ta funkcjonalność pozwala na bezpieczne | |
72 | zatrzymywanie systemów, sprawdzanie stanu zasilania przez WWW i inne. | |
73 | ||
74 | %description -l ru.UTF-8 | |
75 | Эти программы - часть проекта по мониторингу различных UPS. У многих | |
76 | моделей есть сериальные порты, позволяющие проверять состояние этих | |
77 | UPS. Эта возможность была использована, где это возможно, для | |
78 | выполнения безопасных остановов компьютеров, отслеживания статуса | |
79 | через веб и т.п. | |
80 | ||
81 | %description -l uk.UTF-8 | |
82 | Ці програми є частиною проекту по моніторингу різноманітних UPS. | |
83 | Багато моделей мають серіальні порти, що дозволять перевіряти стан цих | |
84 | UPS. Ця можливість була використана, де це можливо, для виконання | |
85 | безпечних зупинок комп'ютерів, відслідковування статусу через веб, | |
86 | тощо. | |
87 | ||
88 | %package common | |
89 | Summary: Package with common files for nut daemon and its clients | |
90 | Summary(pl.UTF-8): Pakiet z plikami wspólnymi dla demona nut i jego klientów | |
91 | Group: Applications/System | |
92 | Requires(postun): /usr/sbin/groupdel | |
93 | Requires(postun): /usr/sbin/userdel | |
94 | Requires(pre): /bin/id | |
95 | Requires(pre): /usr/bin/getgid | |
96 | Requires(pre): /usr/sbin/groupadd | |
97 | Requires(pre): /usr/sbin/groupmod | |
98 | Requires(pre): /usr/sbin/useradd | |
99 | Provides: group(ups) | |
100 | Provides: user(ups) | |
101 | ||
102 | %description common | |
103 | Package with common files for nut daemon and its clients. | |
104 | ||
105 | %description common -l pl.UTF-8 | |
106 | Pakiet z plikami wspólnymi dla demona nut i jego klientów. | |
107 | ||
108 | %package client | |
109 | Summary: Multi-vendor UPS Monitoring Project Client Utilities | |
110 | Summary(pl.UTF-8): Narzędzia klienckie do monitorowania UPS-ów | |
111 | Summary(ru.UTF-8): Network UPS Tools - клиентские утилиты мониторинга | |
112 | Summary(uk.UTF-8): Network UPS Tools - клієнтські утиліти моніторингу | |
113 | Group: Applications/System | |
114 | Requires(post,preun): /sbin/chkconfig | |
115 | Requires: %{name}-common = %{version}-%{release} | |
116 | Requires: rc-scripts | |
117 | Requires: systemd-units >= 38 | |
118 | ||
119 | %description client | |
120 | This package includes the client utilities that are required to | |
121 | monitor a UPS that the client host is plugged into but monitored via | |
122 | serial cable by another host on the network.... | |
123 | ||
124 | %description client -l pl.UTF-8 | |
125 | Ten pakiet zawiera narzędzia kliencie potrzebne do monitorowania UPS-a | |
126 | do którego podłączony jest komputer kliencki, kiedy kabel szeregowy | |
127 | UPS-a jest podłączony do innego komputera w sieci. | |
128 | ||
129 | %description client -l ru.UTF-8 | |
130 | Этот пакет включает клиентские утилиты, необходимые для мониторинга | |
131 | UPS, к которому клиентский хост имеет доступ, но UPS физически | |
132 | подключен к другому компьютеру в сети. | |
133 | ||
134 | %description client -l uk.UTF-8 | |
135 | Цей пакет включає клієнтські утиліти, потрібні для моніторингу UPS, до | |
136 | якого клієнтський хост має доступ, але UPS фізично підключений до | |
137 | іншого комп'ютеру в мережі. | |
138 | ||
139 | %package cgi | |
140 | Summary: Multi-vendor UPS Monitoring Project Server - CGI utils | |
141 | Summary(pl.UTF-8): Narzędzia CGI do monitorowania UPS-ów | |
142 | Summary(ru.UTF-8): Network UPS Tools - CGI утилиты | |
143 | Summary(uk.UTF-8): Network UPS Tools - CGI утиліти | |
144 | Group: Applications/System | |
145 | Requires: %{name}-common = %{version}-%{release} | |
146 | ||
147 | %description cgi | |
148 | These programs are part of a developing project to monitor the | |
149 | assortment of UPSes that are found out there in the field. Many models | |
150 | have serial serial ports of some kind that allow some form of state | |
151 | checking. This capability has been harnessed where possible to allow | |
152 | for safe shutdowns, live status tracking on web pages, and more. This | |
153 | package contains CGI utils. | |
154 | ||
155 | %description cgi -l pl.UTF-8 | |
156 | Te programy są częścią projektu do monitorowania wielu UPS-ów w jakimś | |
157 | otoczeniu. Wiele modeli ma porty szeregowe i pozwala na jakąś formę | |
158 | sprawdzania stanu. Ta funkcjonalność pozwala na bezpieczne | |
159 | zatrzymywanie systemów, sprawdzanie stanu zasilania przez WWW i inne. | |
160 | Ten pakiet zawiera narzędzia CGI. | |
161 | ||
162 | %description cgi -l ru.UTF-8 | |
163 | Этот пакет включает CGI программы для доступа к информации о статусе | |
164 | UPS через веб-интерфейс. | |
165 | ||
166 | %description cgi -l uk.UTF-8 | |
167 | Цей пакет включає CGI програми для доступу до інформації про статус | |
168 | UPS через веб-інтерфейс. | |
169 | ||
170 | %package devel | |
171 | Summary: Files for NUT clients development | |
172 | Summary(pl.UTF-8): Pliki do tworzenia klientów NUT-a | |
173 | Group: Development/Libraries | |
174 | Requires: %{name}-common = %{version}-%{release} | |
175 | Requires: openssl-devel >= 0.9.7c | |
176 | ||
177 | %description devel | |
178 | Object file and header for developing NUT clients. | |
179 | ||
180 | %description devel -l pl.UTF-8 | |
181 | Plik wynikowy oraz nagłówek służące do tworzenia klientów NUT-a. | |
182 | ||
183 | %package hal | |
184 | Summary: NUT integration with FreeDesktop HAL | |
185 | Summary(pl.UTF-8): Pliki do integracji NUT-a z HAL-em | |
186 | Group: Development/Libraries | |
187 | Requires: %{name} = %{version}-%{release} | |
188 | ||
189 | %description hal | |
190 | NUT integration with FreeDesktop HAL. | |
191 | ||
192 | %description hal -l pl.UTF-8 | |
193 | Pliki do integracji NUT-a z HAL-em. | |
194 | ||
195 | %prep | |
196 | %setup -q | |
197 | %patch0 -p1 | |
198 | %patch1 -p1 | |
199 | %patch2 -p1 | |
200 | %patch3 -p1 | |
201 | %patch4 -p1 | |
202 | %patch5 -p1 | |
203 | %patch6 -p1 | |
204 | %patch7 -p1 | |
205 | %patch8 -p1 | |
206 | %patch9 -p1 | |
207 | ||
208 | %build | |
209 | cp -f /usr/share/automake/config.sub . | |
210 | %{__libtoolize} | |
211 | %{__aclocal} -I m4 | |
212 | %{__automake} | |
213 | %{__autoconf} | |
214 | %configure \ | |
215 | --datadir=%{_datadir}/%{name} \ | |
216 | --with-htmlpath=%{_datadir}/%{name}/html \ | |
217 | --with-serial \ | |
218 | --with%{!?with_usb:out}-usb \ | |
219 | --with%{!?with_snmp:out}-snmp \ | |
220 | --with%{!?with_hal:out}-hal \ | |
221 | --with%{!?with_cgi:out}-cgi \ | |
222 | --with-avahi \ | |
223 | --with-snmp \ | |
224 | --with-ipmi \ | |
225 | --with-dev \ | |
226 | --with%{!?with_neon:out}-neon \ | |
227 | --with-ssl \ | |
228 | %{?with_usb:--with-udev-dir=/etc/udev} \ | |
229 | %{!?with_hal:--without-hal} \ | |
230 | %{?with_hal:--with-hal-callouts-path=%{_libdir}/hal} \ | |
231 | %{?with_hal:--with-hal-fdi-path=%{_datadir}/hal/fdi/information/20thirdparty} \ | |
232 | --with-statepath=%{_var}/lib/ups \ | |
233 | --with-drvpath=/lib/nut \ | |
234 | --with-cgipath=/home/services/httpd/cgi-bin \ | |
235 | --with-systemdsystemunitdir=%{systemdunitdir} \ | |
236 | --with-user=ups \ | |
237 | --with-group=ups | |
238 | ||
239 | %{__make} | |
240 | ||
241 | %install | |
242 | rm -rf $RPM_BUILD_ROOT | |
243 | install -d $RPM_BUILD_ROOT{/etc/{sysconfig,rc.d/init.d},/var/lib/ups,/lib/nut,/sbin} | |
244 | ||
245 | %{__make} install \ | |
246 | DESTDIR=$RPM_BUILD_ROOT | |
247 | ||
248 | install %{SOURCE1} $RPM_BUILD_ROOT/etc/rc.d/init.d/ups | |
249 | install %{SOURCE2} $RPM_BUILD_ROOT/etc/sysconfig/ups | |
250 | install %{SOURCE3} $RPM_BUILD_ROOT/etc/rc.d/init.d/upsmon | |
251 | install %{SOURCE4} $RPM_BUILD_ROOT/etc/sysconfig/upsmon | |
252 | ||
253 | for i in $RPM_BUILD_ROOT%{_sysconfdir}/*.sample; do | |
254 | mv -f $i ${i%.sample} | |
255 | done | |
256 | ||
257 | %{!?with_usb:rm -f $RPM_BUILD_ROOT%{_udevrulesdir}/52-nut-usbups.rules} | |
258 | ||
259 | cat > $RPM_BUILD_ROOT/sbin/poweroff-ups << EOF | |
260 | #!/bin/sh | |
261 | /etc/rc.d/init.d/ups powerdown | |
262 | EOF | |
263 | ||
264 | %{__rm} $RPM_BUILD_ROOT%{_libdir}/*.la | |
265 | ||
266 | %clean | |
267 | rm -rf $RPM_BUILD_ROOT | |
268 | ||
269 | %post | |
270 | /sbin/ldconfig | |
271 | /sbin/chkconfig --add ups | |
272 | %service ups restart "NUT ups daemon" | |
273 | %systemd_post nut-driver.service nut-server.service | |
274 | ||
275 | %preun | |
276 | if [ "$1" = "0" ]; then | |
277 | %service ups stop | |
278 | /sbin/chkconfig --del ups | |
279 | fi | |
280 | %systemd_preun nut-driver.service nut-server.service | |
281 | ||
282 | %postun | |
283 | /sbin/ldconfig | |
284 | %systemd_reload | |
285 | ||
286 | %triggerpostun -- nut < 2.6.4-2 | |
287 | [ -f /etc/sysconfig/rpm ] && . /etc/sysconfig/rpm | |
288 | [ ${RPM_ENABLE_SYSTEMD_SERVICE:-yes} = no ] && exit 0 | |
289 | /sbin/chkconfig --list ups 2>/dev/null | grep -qsv "[0-6]:on" && exit 0 | |
290 | %systemd_service_enable nut-driver.service nut-server.service | |
291 | %systemd_service mask ups.service | |
292 | ||
293 | %pre common | |
294 | # move to trigger? | |
295 | if [ -n "`/usr/bin/getgid ups 2> /dev/null`" ] && [ "`/usr/bin/getgid ups 2> /dev/null`" = 121 ]; then | |
296 | /usr/sbin/groupmod -g 76 ups | |
297 | chgrp ups %{_sysconfdir}/{upsd.conf,ups.conf,upsd.users} | |
298 | /usr/sbin/usermod -g 76 ups | |
299 | fi | |
300 | %groupadd -g 76 ups | |
301 | %useradd -u 70 -d /usr/share/empty -s /bin/false -c "UPS Manager User" -g ups ups | |
302 | ||
303 | %post common -p /sbin/ldconfig | |
304 | ||
305 | %postun common | |
306 | /sbin/ldconfig | |
307 | if [ "$1" = "0" ]; then | |
308 | %userremove ups | |
309 | %groupremove ups | |
310 | fi | |
311 | ||
312 | %post client | |
313 | /sbin/chkconfig --add upsmon | |
314 | %service upsmon restart "NUT upsmon daemon" | |
315 | %systemd_post nut-monitor.service | |
316 | ||
317 | %preun client | |
318 | if [ "$1" = "0" ]; then | |
319 | %service upsmon stop | |
320 | /sbin/chkconfig --del upsmon | |
321 | fi | |
322 | %systemd_preun nut-monitor.service | |
323 | ||
324 | %postun client | |
325 | %systemd_reload | |
326 | ||
327 | %triggerpostun client -- nut-client < 2.6.4-2 | |
328 | [ -f /etc/sysconfig/rpm ] && . /etc/sysconfig/rpm | |
329 | [ ${RPM_ENABLE_SYSTEMD_SERVICE:-yes} = no ] && exit 0 | |
330 | /sbin/chkconfig --list upsmon 2>/dev/null | grep -qsv "[0-6]:on" && exit 0 | |
331 | %systemd_service_enable nut-monitor.service | |
332 | %systemd_service mask upsmon.service | |
333 | ||
334 | %files | |
335 | %defattr(644,root,root,755) | |
336 | %attr(755,root,root) %{_bindir}/nut-scanner | |
337 | %attr(755,root,root) %{_bindir}/upscmd | |
338 | %attr(755,root,root) %{_bindir}/upslog | |
339 | %attr(755,root,root) %{_bindir}/upsrw | |
340 | %attr(755,root,root) %{_sbindir}/upsd | |
341 | %attr(755,root,root) /sbin/poweroff-ups | |
342 | %attr(755,root,root) %ghost %{_libdir}/libnutscan.so.1 | |
343 | %attr(755,root,root) %{_libdir}/libnutscan.so.*.*.* | |
344 | %config(noreplace) %verify(not md5 mtime size) /etc/sysconfig/ups | |
345 | %attr(754,root,root) /etc/rc.d/init.d/ups | |
346 | %attr(640,root,ups) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/nut.conf | |
347 | %attr(640,root,ups) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/upsd.conf | |
348 | %attr(640,root,ups) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/ups.conf | |
349 | %attr(640,root,ups) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/upsd.users | |
350 | %{systemdunitdir}/nut-driver.service | |
351 | %{systemdunitdir}/nut-server.service | |
352 | %{_mandir}/man5/ups.conf.5* | |
353 | %{_mandir}/man5/upsd.conf.5* | |
354 | %{_mandir}/man5/upsd.users.5* | |
355 | %{_mandir}/man8/nut-recorder.8* | |
356 | %{_mandir}/man8/nut-scanner.8* | |
357 | %{_mandir}/man8/upscmd.8* | |
358 | %{_mandir}/man8/upscode2.8* | |
359 | %{_mandir}/man8/upsd.8* | |
360 | %{_mandir}/man8/upsdrvctl.8* | |
361 | %{_mandir}/man8/upslog.8* | |
362 | %{_mandir}/man8/upsrw.8* | |
363 | %dir %attr(770,root,ups) /var/lib/ups | |
364 | %dir /lib/nut | |
365 | %attr(755,root,root) /lib/nut/apcsmart | |
366 | %attr(755,root,root) /lib/nut/apcsmart-old | |
367 | %attr(755,root,root) /lib/nut/bcmxcp | |
368 | %{?with_usb:%attr(755,root,root) /lib/nut/bcmxcp_usb} | |
369 | %attr(755,root,root) /lib/nut/belkin | |
370 | %attr(755,root,root) /lib/nut/belkinunv | |
371 | %attr(755,root,root) /lib/nut/bestfcom | |
372 | %attr(755,root,root) /lib/nut/bestfortress | |
373 | %attr(755,root,root) /lib/nut/bestuferrups | |
374 | %attr(755,root,root) /lib/nut/bestups | |
375 | %attr(755,root,root) /lib/nut/blazer_ser | |
376 | %{?with_usb:%attr(755,root,root) /lib/nut/blazer_usb} | |
377 | %attr(755,root,root) /lib/nut/clone | |
378 | %attr(755,root,root) /lib/nut/clone-outlet | |
379 | %attr(755,root,root) /lib/nut/dummy-ups | |
380 | %attr(755,root,root) /lib/nut/etapro | |
381 | %attr(755,root,root) /lib/nut/everups | |
382 | %attr(755,root,root) /lib/nut/gamatronic | |
383 | %attr(755,root,root) /lib/nut/genericups | |
384 | %attr(755,root,root) /lib/nut/isbmex | |
385 | %attr(755,root,root) /lib/nut/ivtscd | |
386 | %attr(755,root,root) /lib/nut/liebert | |
387 | %attr(755,root,root) /lib/nut/liebert-esp2 | |
388 | %attr(755,root,root) /lib/nut/masterguard | |
389 | %attr(755,root,root) /lib/nut/metasys | |
390 | %attr(755,root,root) /lib/nut/mge-shut | |
391 | %attr(755,root,root) /lib/nut/mge-utalk | |
392 | %attr(755,root,root) /lib/nut/microdowell | |
393 | %{?with_neon:%attr(755,root,root) /lib/nut/netxml-ups} | |
394 | %attr(755,root,root) /lib/nut/nut-ipmipsu | |
395 | %attr(755,root,root) /lib/nut/oldmge-shut | |
396 | %attr(755,root,root) /lib/nut/oneac | |
397 | %attr(755,root,root) /lib/nut/optiups | |
398 | %attr(755,root,root) /lib/nut/powercom | |
399 | %attr(755,root,root) /lib/nut/powerpanel | |
400 | %attr(755,root,root) /lib/nut/rhino | |
401 | %{?with_usb:%attr(755,root,root) /lib/nut/richcomm_usb} | |
402 | %attr(755,root,root) /lib/nut/safenet | |
403 | %attr(755,root,root) /lib/nut/skel | |
404 | %{?with_snmp:%attr(755,root,root) /lib/nut/snmp-ups} | |
405 | %attr(755,root,root) /lib/nut/solis | |
406 | %attr(755,root,root) /lib/nut/tripplite | |
407 | %attr(755,root,root) /lib/nut/tripplitesu | |
408 | %{?with_usb:%attr(755,root,root) /lib/nut/tripplite_usb} | |
409 | %attr(755,root,root) /lib/nut/upscode2 | |
410 | %attr(755,root,root) /lib/nut/upsdrvctl | |
411 | %{?with_usb:%attr(755,root,root) /lib/nut/usbhid-ups} | |
412 | %attr(755,root,root) /lib/nut/victronups | |
413 | %dir %{_datadir}/nut | |
414 | %{_datadir}/nut/cmdvartab | |
415 | %{_datadir}/nut/driver.list | |
416 | %{_mandir}/man5/nut.conf.5* | |
417 | %{_mandir}/man8/apcsmart.8* | |
418 | %{_mandir}/man8/apcsmart-old.8* | |
419 | %{_mandir}/man8/bcmxcp.8* | |
420 | %{?with_usb:%{_mandir}/man8/bcmxcp_usb.8*} | |
421 | %{_mandir}/man8/belkin.8* | |
422 | %{_mandir}/man8/belkinunv.8* | |
423 | %{_mandir}/man8/bestfcom.8* | |
424 | %{_mandir}/man8/bestfortress.8* | |
425 | %{_mandir}/man8/bestuferrups.8* | |
426 | %{_mandir}/man8/bestups.8* | |
427 | %{_mandir}/man8/blazer.8* | |
428 | %{_mandir}/man8/clone.8* | |
429 | %{_mandir}/man8/dummy-ups.8* | |
430 | %{_mandir}/man8/etapro.8* | |
431 | %{_mandir}/man8/everups.8* | |
432 | %{_mandir}/man8/gamatronic.8* | |
433 | %{_mandir}/man8/genericups.8* | |
434 | %{_mandir}/man8/isbmex.8* | |
435 | %{_mandir}/man8/ivtscd.8* | |
436 | %{_mandir}/man8/liebert.8* | |
437 | %{_mandir}/man8/liebert-esp2.8* | |
438 | %{_mandir}/man8/masterguard.8* | |
439 | %{_mandir}/man8/metasys.8* | |
440 | %{_mandir}/man8/mge-shut.8* | |
441 | %{_mandir}/man8/mge-utalk.8* | |
442 | %{_mandir}/man8/microdowell.8* | |
443 | %{?with_neon:%{_mandir}/man8/netxml-ups.8*} | |
444 | %{_mandir}/man8/nut-ipmipsu.8* | |
445 | %{_mandir}/man8/nutupsdrv.8* | |
446 | %{_mandir}/man8/oneac.8* | |
447 | %{_mandir}/man8/optiups.8* | |
448 | %{_mandir}/man8/powercom.8* | |
449 | %{_mandir}/man8/powerpanel.8* | |
450 | %{_mandir}/man8/rhino.8* | |
451 | %{?with_usb:%{_mandir}/man8/richcomm_usb.8*} | |
452 | %{_mandir}/man8/safenet.8* | |
453 | %{?with_snmp:%{_mandir}/man8/snmp-ups.8*} | |
454 | %{_mandir}/man8/solis.8* | |
455 | %{_mandir}/man8/tripplite.8* | |
456 | %{_mandir}/man8/tripplitesu.8* | |
457 | %{?with_usb:%{_mandir}/man8/tripplite_usb.8*} | |
458 | %{?with_usb:%{_mandir}/man8/usbhid-ups.8*} | |
459 | %{_mandir}/man8/victronups.8* | |
460 | %{?with_usb:%config(noreplace) %verify(not md5 mtime size) %{_udevrulesdir}/52-nut-usbups.rules} | |
461 | %config(noreplace) %verify(not md5 mtime size) %{_udevrulesdir}/52-nut-ipmipsu.rules | |
462 | ||
463 | %files common | |
464 | %defattr(644,root,root,755) | |
465 | %doc AUTHORS MAINTAINERS NEWS README UPGRADING ChangeLog docs | |
466 | %dir %{_sysconfdir} | |
467 | %attr(755,root,root) %ghost %{_libdir}/libupsclient.so.1 | |
468 | %attr(755,root,root) %{_libdir}/libupsclient.so.*.*.* | |
469 | ||
470 | %files client | |
471 | %defattr(644,root,root,755) | |
472 | %attr(755,root,root) %{_bindir}/upsc | |
473 | %attr(755,root,root) %{_sbindir}/upsmon | |
474 | %attr(755,root,root) %{_sbindir}/upssched | |
475 | %attr(754,root,root) /etc/rc.d/init.d/upsmon | |
476 | %attr(640,root,ups) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/upsmon.conf | |
477 | %attr(640,root,ups) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/upssched.conf | |
478 | %attr(750,root,ups) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/upssched-cmd | |
479 | %config(noreplace) %verify(not md5 mtime size) /etc/sysconfig/upsmon | |
480 | /lib/systemd/system-shutdown/nutshutdown | |
481 | %{systemdunitdir}/nut-monitor.service | |
482 | %{_mandir}/man5/upsmon.conf.5* | |
483 | %{_mandir}/man5/upssched.conf.5* | |
484 | %{_mandir}/man8/upsc.8* | |
485 | %{_mandir}/man8/upsmon.8* | |
486 | %{_mandir}/man8/upssched.8* | |
487 | ||
488 | %if %{with cgi} | |
489 | %files cgi | |
490 | %defattr(644,root,root,755) | |
491 | %{_datadir}/%{name}/html | |
492 | %attr(755,root,root) /home/services/httpd/cgi-bin/*.cgi | |
493 | %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/hosts.conf | |
494 | %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/upsset.conf | |
495 | %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/*.html | |
496 | %{_mandir}/man5/hosts.conf.5* | |
497 | %{_mandir}/man5/upsset.conf.5* | |
498 | %{_mandir}/man5/upsstats.html.5* | |
499 | %{_mandir}/man8/upsimage.cgi.8* | |
500 | %{_mandir}/man8/upsset.cgi.8* | |
501 | %{_mandir}/man8/upsstats.cgi.8* | |
502 | %endif | |
503 | ||
504 | %if %{with hal} | |
505 | %files hal | |
506 | %defattr(644,root,root,755) | |
507 | %attr(755,root,root) %{_libdir}/hal/hald-addon-bcmxcp_usb | |
508 | %attr(755,root,root) %{_libdir}/hal/hald-addon-blazer_usb | |
509 | %attr(755,root,root) %{_libdir}/hal/hald-addon-tripplite_usb | |
510 | %attr(755,root,root) %{_libdir}/hal/hald-addon-usbhid-ups | |
511 | %{_datadir}/hal/fdi/information/20thirdparty/20-ups-nut-device.fdi | |
512 | %endif | |
513 | ||
514 | %files devel | |
515 | %defattr(644,root,root,755) | |
516 | %attr(755,root,root) %{_libdir}/libupsclient.so | |
517 | %attr(755,root,root) %{_libdir}/libnutscan.so | |
518 | %{_pkgconfigdir}/libupsclient.pc | |
519 | %{_pkgconfigdir}/libnutscan.pc | |
520 | %{_includedir}/*.h | |
521 | %{_mandir}/man3/*.3* |