]>
Commit | Line | Data |
---|---|---|
f44ff8b9 JB |
1 | # TODO: |
2 | # - SysV init script (scripts/powerman, needs to be PLDified) | |
3 | # - register systemd service etc. | |
d889afaf JB |
4 | # |
5 | # Conditional build: | |
6 | %bcond_without static_libs # static library | |
7 | # | |
8 | Summary: PowerMan - centralized power control for clusters | |
9 | Summary(pl.UTF-8): PowerMan - scentralizowane zarządzanie zasilaniem dla klastrów | |
10 | Name: powerman | |
11 | Version: 2.3.24 | |
72a416ff | 12 | Release: 3 |
d889afaf JB |
13 | License: GPL v2+ |
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 | |
19 | BuildRequires: bison | |
20 | BuildRequires: curl-devel | |
21 | BuildRequires: flex | |
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) | |
28 | ||
29 | %description | |
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 | |
33 | new devices. | |
34 | ||
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ń. | |
40 | ||
41 | %package stonith | |
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 | |
47 | ||
48 | %description stonith | |
49 | PowerMan plugin for STONITH interface. | |
50 | ||
51 | %description stonith -l pl.UTF-8 | |
52 | Wtyczka PowerMan do interfejsu STONITH. | |
53 | ||
54 | %package libs | |
55 | Summary: Library for applications using PowerMan | |
56 | Summary(pl.UTF-8): Biblioteka dla aplikacji wykorzystujących PowerMan | |
57 | Group: Libraries | |
58 | ||
59 | %description libs | |
60 | Shared library for applications using PowerMan. | |
61 | ||
62 | %description libs -l pl.UTF-8 | |
63 | Biblioteka współdzielona dla aplikacji wykorzystujących PowerMan. | |
64 | ||
65 | %package devel | |
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} | |
70 | ||
71 | %description devel | |
72 | Header files for PowerMan library. | |
73 | ||
74 | %description devel -l pl.UTF-8 | |
75 | Pliki nagłówkowe biblioteki PowerMan. | |
76 | ||
77 | %package static | |
78 | Summary: Static PowerMan library | |
79 | Summary(pl.UTF-8): Statyczna biblioteka PowerMan | |
80 | Group: Development/Libraries | |
81 | Requires: %{name}-devel = %{version}-%{release} | |
82 | ||
83 | %description static | |
84 | Static PowerMan library. | |
85 | ||
86 | %description static -l pl.UTF-8 | |
87 | Statyczna biblioteka PowerMan. | |
88 | ||
89 | %prep | |
90 | %setup -q | |
91 | ||
92 | %build | |
93 | %configure \ | |
94 | --disable-silent-rules \ | |
95 | %{!?with_static_libs:--disable-static} \ | |
96 | --with-genders \ | |
97 | --with-httppower \ | |
98 | --with-snmppower \ | |
99 | --with-systemdsystemunitdir=%{systemdunitdir} | |
100 | ||
101 | %{__make} | |
102 | ||
103 | %install | |
104 | rm -rf $RPM_BUILD_ROOT | |
105 | ||
106 | %{__make} install \ | |
107 | DESTDIR=$RPM_BUILD_ROOT | |
108 | ||
109 | %{__mv} $RPM_BUILD_ROOT%{_sysconfdir}/powerman/powerman.conf{.example,} | |
110 | ||
111 | install -d $RPM_BUILD_ROOT%{systemdtmpfilesdir} | |
112 | cat >$RPM_BUILD_ROOT%{systemdtmpfilesdir}/powerman.conf <<EOF | |
113 | d /var/run/powerman 0755 root root - | |
114 | EOF | |
115 | ||
116 | # obsoleted by pkg-config | |
117 | %{__rm} $RPM_BUILD_ROOT%{_libdir}/libpowerman.la | |
118 | ||
119 | %clean | |
120 | rm -rf $RPM_BUILD_ROOT | |
121 | ||
122 | %post libs -p /sbin/ldconfig | |
123 | %postun libs -p /sbin/ldconfig | |
124 | ||
125 | %files | |
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* | |
149 | ||
150 | %files stonith | |
151 | %defattr(644,root,root,755) | |
152 | %attr(755,root,root) %{_libdir}/stonith/plugins/external/powerman | |
153 | ||
154 | %files libs | |
155 | %defattr(644,root,root,755) | |
156 | %attr(755,root,root) %{_libdir}/libpowerman.so.*.*.* | |
157 | %attr(755,root,root) %ghost %{_libdir}/libpowerman.so.0 | |
158 | ||
159 | %files devel | |
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* | |
165 | ||
166 | %if %{with static_libs} | |
167 | %files static | |
168 | %defattr(644,root,root,755) | |
169 | %{_libdir}/libpowerman.a | |
170 | %endif |