2 # - SysV init script (scripts/powerman, needs to be PLDified)
3 # - register systemd service etc.
6 %bcond_without static_libs # static library
8 Summary: PowerMan - centralized power control for clusters
9 Summary(pl.UTF-8): PowerMan - scentralizowane zarządzanie zasilaniem dla klastrów
14 Group: Applications/System
15 #Source0Download: https://github.com/chaos/powerman/releases
16 Source0: https://github.com/chaos/powerman/releases/download/%{version}/%{name}-%{version}.tar.gz
17 # Source0-md5: 94da2ea19d8855fb383029c5da80f03e
18 URL: https://github.com/chaos/powerman
20 BuildRequires: curl-devel
22 BuildRequires: genders-devel
23 BuildRequires: ncurses-devel
24 BuildRequires: net-snmp-devel
25 BuildRequires: pkgconfig
26 Requires: %{name}-libs = %{version}-%{release}
27 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
30 PowerMan is a tool for manipulating remote power control (RPC) devices
31 from a central location. Several RPC varieties are supported natively
32 by PowerMan and Expect-like configurability simplifies the addition of
35 %description -l pl.UTF-8
36 PowerMan to narzędzie do operowanie urządzeniami zdalnego sterowania
37 zasilaniem (RPC - Remote Power Control) ze scentralizowanego miejsca.
38 Natywnie przez PowerMana obsługiwane jest kilka rodzajów RPC, a
39 konfiguracja w stylu Expecta upraszcza dodawanie nowych urządzeń.
42 Summary: PowerMan plugin for STONITH interface
43 Summary(pl.UTF-8): Wtyczka PowerMan do interfejsu STONITH
44 Group: Applications/System
45 Requires: %{name} = %{version}-%{release}
46 Requires: cluster-glue-stonith
49 PowerMan plugin for STONITH interface.
51 %description stonith -l pl.UTF-8
52 Wtyczka PowerMan do interfejsu STONITH.
55 Summary: Library for applications using PowerMan
56 Summary(pl.UTF-8): Biblioteka dla aplikacji wykorzystujących PowerMan
60 Shared library for applications using PowerMan.
62 %description libs -l pl.UTF-8
63 Biblioteka współdzielona dla aplikacji wykorzystujących PowerMan.
66 Summary: Header files for PowerMan library
67 Summary(pl.UTF-8): Pliki nagłówkowe biblioteki PowerMan
68 Group: Development/Libraries
69 Requires: %{name}-libs = %{version}-%{release}
72 Header files for PowerMan library.
74 %description devel -l pl.UTF-8
75 Pliki nagłówkowe biblioteki PowerMan.
78 Summary: Static PowerMan library
79 Summary(pl.UTF-8): Statyczna biblioteka PowerMan
80 Group: Development/Libraries
81 Requires: %{name}-devel = %{version}-%{release}
84 Static PowerMan library.
86 %description static -l pl.UTF-8
87 Statyczna biblioteka PowerMan.
94 --disable-silent-rules \
95 %{!?with_static_libs:--disable-static} \
99 --with-systemdsystemunitdir=%{systemdunitdir}
104 rm -rf $RPM_BUILD_ROOT
107 DESTDIR=$RPM_BUILD_ROOT
109 %{__mv} $RPM_BUILD_ROOT%{_sysconfdir}/powerman/powerman.conf{.example,}
111 install -d $RPM_BUILD_ROOT%{systemdtmpfilesdir}
112 cat >$RPM_BUILD_ROOT%{systemdtmpfilesdir}/powerman.conf <<EOF
113 d /var/run/powerman 0755 root root -
116 # obsoleted by pkg-config
117 %{__rm} $RPM_BUILD_ROOT%{_libdir}/libpowerman.la
120 rm -rf $RPM_BUILD_ROOT
122 %post libs -p /sbin/ldconfig
123 %postun libs -p /sbin/ldconfig
126 %defattr(644,root,root,755)
127 %doc AUTHORS DISCLAIMER NEWS README TODO
128 %attr(755,root,root) %{_bindir}/pm
129 %attr(755,root,root) %{_bindir}/powerman
130 %attr(755,root,root) %{_sbindir}/httppower
131 %attr(755,root,root) %{_sbindir}/plmpower
132 %attr(755,root,root) %{_sbindir}/powermand
133 %attr(755,root,root) %{_sbindir}/snmppower
134 %attr(755,root,root) %{_sbindir}/vpcd
135 %dir %{_sysconfdir}/powerman
136 %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/powerman/powerman.conf
137 %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/powerman/*.dev
138 %{systemdunitdir}/powerman.service
139 %{systemdtmpfilesdir}/powerman.conf
140 %dir /var/run/powerman
141 %{_mandir}/man1/pm.1*
142 %{_mandir}/man1/powerman.1*
143 %{_mandir}/man5/powerman.conf.5*
144 %{_mandir}/man5/powerman.dev.5*
145 %{_mandir}/man8/httppower.8*
146 %{_mandir}/man8/plmpower.8*
147 %{_mandir}/man8/powermand.8*
148 %{_mandir}/man8/vpcd.8*
151 %defattr(644,root,root,755)
152 %attr(755,root,root) %{_libdir}/stonith/plugins/external/powerman
155 %defattr(644,root,root,755)
156 %attr(755,root,root) %{_libdir}/libpowerman.so.*.*.*
157 %attr(755,root,root) %ghost %{_libdir}/libpowerman.so.0
160 %defattr(644,root,root,755)
161 %attr(755,root,root) %{_libdir}/libpowerman.so
162 %{_includedir}/libpowerman.h
163 %{_pkgconfigdir}/libpowerman.pc
164 %{_mandir}/man3/libpowerman.3*
166 %if %{with static_libs}
168 %defattr(644,root,root,755)
169 %{_libdir}/libpowerman.a