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