]>
Commit | Line | Data |
---|---|---|
47b9e296 | 1 | %global alphatag @alphatag@ |
b2400314 FDN |
2 | %global numcomm @numcomm@ |
3 | %global dirty @dirty@ | |
85fb6472 AS |
4 | |
5 | # Conditionals | |
6 | # Invoke "rpmbuild --without <feature>" or "rpmbuild --with <feature>" | |
7 | # to disable or enable specific features | |
8 | %bcond_with testagents | |
07d06c0c AS |
9 | %bcond_with watchdog |
10 | %bcond_with monitoring | |
2a568d6e AS |
11 | %bcond_with snmp |
12 | %bcond_with dbus | |
85fb6472 | 13 | |
b5fc4494 FDN |
14 | Name: corosync |
15 | Summary: The Corosync Cluster Engine and Application Programming Interfaces | |
16 | Version: @version@ | |
b2400314 | 17 | Release: 1%{?numcomm:.%{numcomm}}%{?alphatag:.%{alphatag}}%{?dirty:.%{dirty}}%{?dist} |
b5fc4494 FDN |
18 | License: BSD |
19 | Group: System Environment/Base | |
20 | URL: http://www.openais.org | |
b2400314 | 21 | Source0: http://developer.osdl.org/dev/openais/downloads/%{name}-%{version}/%{name}-%{version}%{?numcomm:.%{numcomm}}%{?alphatag:-%{alphatag}}%{?dirty:-%{dirty}}.tar.gz |
b5fc4494 FDN |
22 | |
23 | # Runtime bits | |
24 | Requires: corosynclib = %{version}-%{release} | |
25 | Requires(pre): /usr/sbin/useradd | |
26 | Requires(post): /sbin/chkconfig | |
27 | Requires(preun): /sbin/chkconfig | |
28 | Conflicts: openais <= 0.89, openais-devel <= 0.89 | |
29 | ||
47b9e296 FDN |
30 | # Build bits |
31 | ||
8c3680d1 SD |
32 | %define buildtrunk 0 |
33 | %{?_with_buildtrunk: %define buildtrunk 1} | |
34 | ||
35 | %if %{buildtrunk} | |
b5fc4494 | 36 | BuildRequires: autoconf automake |
8c3680d1 | 37 | %endif |
b5fc4494 | 38 | BuildRequires: nss-devel |
15f3bc84 | 39 | BuildRequires: libibverbs-devel librdmacm-devel |
2a568d6e AS |
40 | %if %{with snmp} |
41 | BuildRequires: net-snmp-devel | |
42 | %endif | |
43 | %if %{with dbus} | |
44 | BuildRequires: dbus-devel | |
45 | %endif | |
b5fc4494 FDN |
46 | |
47 | BuildRoot: %(mktemp -ud %{_tmppath}/%{name}-%{version}-%{release}-XXXXXX) | |
48 | ||
49 | %prep | |
b2400314 | 50 | %setup -q -n %{name}-%{version}%{?numcomm:.%{numcomm}}%{?alphatag:-%{alphatag}}%{?dirty:-%{dirty}} |
b5fc4494 | 51 | |
583eb6ae | 52 | %build |
8c3680d1 | 53 | %if %{buildtrunk} |
b5fc4494 | 54 | ./autogen.sh |
8c3680d1 | 55 | %endif |
b5fc4494 | 56 | |
15f3bc84 FDN |
57 | export ibverbs_CFLAGS=-I/usr/include/infiniband \ |
58 | export ibverbs_LIBS=-libverbs \ | |
59 | export rdmacm_CFLAGS=-I/usr/include/rdma \ | |
60 | export rdmacm_LIBS=-lrdmacm \ | |
61 | %{configure} \ | |
62 | --enable-nss \ | |
85fb6472 | 63 | %if %{with testagents} |
45fc3a51 | 64 | --enable-testagents \ |
07d06c0c AS |
65 | %endif |
66 | %if %{with watchdog} | |
67 | --enable-watchdog \ | |
68 | %endif | |
69 | %if %{with monitoring} | |
70 | --enable-monitoring \ | |
2a568d6e AS |
71 | %endif |
72 | %if %{with snmp} | |
73 | --enable-snmp \ | |
74 | %endif | |
75 | %if %{with dbus} | |
76 | --enable-dbus \ | |
85fb6472 | 77 | %endif |
dac5df7d | 78 | --enable-rdma \ |
6bae61d8 | 79 | --with-initddir=%{_initrddir} |
b5fc4494 | 80 | |
b5fc4494 FDN |
81 | make %{_smp_mflags} |
82 | ||
83 | %install | |
84 | rm -rf %{buildroot} | |
85 | ||
86 | make install DESTDIR=%{buildroot} | |
b5fc4494 FDN |
87 | |
88 | ## tree fixup | |
89 | # drop static libs | |
90 | rm -f %{buildroot}%{_libdir}/*.a | |
91 | # drop docs and html docs for now | |
92 | rm -rf %{buildroot}%{_docdir}/* | |
93 | ||
94 | %clean | |
95 | rm -rf %{buildroot} | |
96 | ||
6aad39be | 97 | %description |
b5fc4494 FDN |
98 | This package contains the Corosync Cluster Engine Executive, several default |
99 | APIs and libraries, default configuration files, and an init script. | |
100 | ||
101 | %post | |
583eb6ae SD |
102 | if [ $1 -eq 1 ]; then |
103 | /sbin/chkconfig --add corosync || : | |
104 | fi | |
b5fc4494 FDN |
105 | |
106 | %preun | |
107 | if [ $1 -eq 0 ]; then | |
108 | /sbin/service corosync stop &>/dev/null || : | |
109 | /sbin/chkconfig --del corosync || : | |
110 | fi | |
111 | ||
6aad39be | 112 | %files |
b5fc4494 FDN |
113 | %defattr(-,root,root,-) |
114 | %doc LICENSE SECURITY | |
3b34f609 | 115 | %{_bindir}/corosync-blackbox |
b5fc4494 FDN |
116 | %{_sbindir}/corosync |
117 | %{_sbindir}/corosync-keygen | |
118 | %{_sbindir}/corosync-objctl | |
119 | %{_sbindir}/corosync-cfgtool | |
120 | %{_sbindir}/corosync-fplay | |
121 | %{_sbindir}/corosync-pload | |
15f3bc84 FDN |
122 | %{_sbindir}/corosync-cpgtool |
123 | %{_sbindir}/corosync-quorumtool | |
2a568d6e | 124 | %{_sbindir}/corosync-notifyd |
45fc3a51 | 125 | %{_bindir}/corosync-blackbox |
b446d4e9 | 126 | %dir %{_sysconfdir}/corosync |
b7ebf110 | 127 | %dir %{_sysconfdir}/corosync/service.d |
b446d4e9 FDN |
128 | %dir %{_sysconfdir}/corosync/uidgid.d |
129 | %config(noreplace) %{_sysconfdir}/corosync/corosync.conf.example | |
bb05aed9 | 130 | %config(noreplace) %{_sysconfdir}/corosync/corosync.conf.example.udpu |
2a568d6e AS |
131 | %if %{with dbus} |
132 | %{_sysconfdir}/dbus-1/system.d/corosync-signals.conf | |
133 | %endif | |
134 | %if %{with snmp} | |
135 | %(_datadir)/snmp/mibs/COROSYNC-MIB.txt | |
136 | %endif | |
6bae61d8 | 137 | %{_initrddir}/corosync |
2a568d6e | 138 | %{_initrddir}/corosync-notifyd |
b5fc4494 FDN |
139 | %dir %{_libexecdir}/lcrso |
140 | %{_libexecdir}/lcrso/coroparse.lcrso | |
141 | %{_libexecdir}/lcrso/objdb.lcrso | |
142 | %{_libexecdir}/lcrso/service_cfg.lcrso | |
143 | %{_libexecdir}/lcrso/service_cpg.lcrso | |
144 | %{_libexecdir}/lcrso/service_evs.lcrso | |
145 | %{_libexecdir}/lcrso/service_confdb.lcrso | |
146 | %{_libexecdir}/lcrso/service_pload.lcrso | |
147 | %{_libexecdir}/lcrso/quorum_votequorum.lcrso | |
148 | %{_libexecdir}/lcrso/quorum_testquorum.lcrso | |
149 | %{_libexecdir}/lcrso/vsf_quorum.lcrso | |
150 | %{_libexecdir}/lcrso/vsf_ykd.lcrso | |
07d06c0c AS |
151 | %if %{with watchdog} |
152 | %{_libexecdir}/lcrso/service_wd.lcrso | |
153 | %endif | |
154 | %if %{with monitoring} | |
155 | %{_libexecdir}/lcrso/service_mon.lcrso | |
156 | %endif | |
b446d4e9 | 157 | %dir %{_localstatedir}/lib/corosync |
60f13c03 | 158 | %dir %{_localstatedir}/log/cluster |
b5fc4494 | 159 | %{_mandir}/man8/corosync_overview.8* |
824467e6 AS |
160 | %{_mandir}/man8/corosync.8* |
161 | %{_mandir}/man8/corosync-blackbox.8* | |
b5fc4494 | 162 | %{_mandir}/man8/corosync-objctl.8* |
52632075 | 163 | %{_mandir}/man8/corosync-keygen.8* |
de317d57 | 164 | %{_mandir}/man8/corosync-cfgtool.8* |
b7ed8064 | 165 | %{_mandir}/man8/corosync-cpgtool.8* |
54fe60a6 | 166 | %{_mandir}/man8/corosync-fplay.8* |
3a2771d0 | 167 | %{_mandir}/man8/corosync-pload.8* |
2a568d6e | 168 | %{_mandir}/man8/corosync-notifyd.8* |
d655a79c | 169 | %{_mandir}/man8/corosync-quorumtool.8* |
b5fc4494 FDN |
170 | %{_mandir}/man5/corosync.conf.5* |
171 | ||
85fb6472 AS |
172 | |
173 | # optional testagent rpm | |
174 | # | |
175 | %if %{with testagents} | |
176 | ||
177 | %package -n corosync-testagents | |
178 | Summary: The Corosync Cluster Engine Test Agents | |
179 | Group: Development/Libraries | |
180 | Requires: %{name} = %{version}-%{release} | |
181 | ||
182 | %description -n corosync-testagents | |
183 | This package contains corosync test agents. | |
184 | ||
185 | %files -n corosync-testagents | |
186 | %defattr(755,root,root,-) | |
187 | %{_datadir}/corosync/tests/mem_leak_test.sh | |
188 | %{_datadir}/corosync/tests/net_breaker.sh | |
189 | %{_bindir}/cpg_test_agent | |
1cdad310 AS |
190 | %{_bindir}/confdb_test_agent |
191 | %{_bindir}/sam_test_agent | |
192 | %{_bindir}/votequorum_test_agent | |
193 | %{_libexecdir}/lcrso/service_syncv2.lcrso | |
85fb6472 AS |
194 | |
195 | %endif | |
196 | ||
197 | # library | |
198 | # | |
b5fc4494 FDN |
199 | %package -n corosynclib |
200 | Summary: The Corosync Cluster Engine Libraries | |
201 | Group: System Environment/Libraries | |
47b9e296 | 202 | Requires: %{name} = %{version}-%{release} |
b5fc4494 FDN |
203 | |
204 | %description -n corosynclib | |
205 | This package contains corosync libraries. | |
206 | ||
207 | %files -n corosynclib | |
208 | %defattr(-,root,root,-) | |
209 | %doc LICENSE | |
210 | %{_libdir}/libcfg.so.* | |
211 | %{_libdir}/libcpg.so.* | |
212 | %{_libdir}/libconfdb.so.* | |
213 | %{_libdir}/libevs.so.* | |
214 | %{_libdir}/libtotem_pg.so.* | |
215 | %{_libdir}/liblogsys.so.* | |
216 | %{_libdir}/libcoroipcc.so.* | |
217 | %{_libdir}/libcoroipcs.so.* | |
218 | %{_libdir}/libquorum.so.* | |
219 | %{_libdir}/libvotequorum.so.* | |
220 | %{_libdir}/libpload.so.* | |
47ae82b0 | 221 | %{_libdir}/libsam.so.* |
b5fc4494 FDN |
222 | |
223 | %post -n corosynclib -p /sbin/ldconfig | |
224 | ||
225 | %postun -n corosynclib -p /sbin/ldconfig | |
226 | ||
227 | %package -n corosynclib-devel | |
228 | Summary: The Corosync Cluster Engine Development Kit | |
229 | Group: Development/Libraries | |
230 | Requires: corosynclib = %{version}-%{release} | |
231 | Requires: pkgconfig | |
232 | Provides: corosync-devel = %{version} | |
233 | Obsoletes: corosync-devel < 0.92-7 | |
234 | ||
235 | %description -n corosynclib-devel | |
236 | This package contains include files and man pages used to develop using | |
237 | The Corosync Cluster Engine APIs. | |
238 | ||
239 | %files -n corosynclib-devel | |
240 | %defattr(-,root,root,-) | |
241 | %doc LICENSE README.devmap | |
242 | %dir %{_includedir}/corosync/ | |
243 | %{_includedir}/corosync/cs_config.h | |
244 | %{_includedir}/corosync/corodefs.h | |
245 | %{_includedir}/corosync/coroipc_types.h | |
246 | %{_includedir}/corosync/coroipcs.h | |
247 | %{_includedir}/corosync/coroipcc.h | |
248 | %{_includedir}/corosync/cfg.h | |
249 | %{_includedir}/corosync/confdb.h | |
250 | %{_includedir}/corosync/corotypes.h | |
251 | %{_includedir}/corosync/cpg.h | |
252 | %{_includedir}/corosync/evs.h | |
253 | %{_includedir}/corosync/hdb.h | |
254 | %{_includedir}/corosync/list.h | |
255 | %{_includedir}/corosync/mar_gen.h | |
47ae82b0 | 256 | %{_includedir}/corosync/sam.h |
b5fc4494 FDN |
257 | %{_includedir}/corosync/swab.h |
258 | %{_includedir}/corosync/quorum.h | |
259 | %{_includedir}/corosync/votequorum.h | |
260 | %dir %{_includedir}/corosync/totem/ | |
261 | %{_includedir}/corosync/totem/coropoll.h | |
262 | %{_includedir}/corosync/totem/totem.h | |
263 | %{_includedir}/corosync/totem/totemip.h | |
264 | %{_includedir}/corosync/totem/totempg.h | |
265 | %dir %{_includedir}/corosync/lcr/ | |
266 | %{_includedir}/corosync/lcr/lcr_ckpt.h | |
267 | %{_includedir}/corosync/lcr/lcr_comp.h | |
268 | %{_includedir}/corosync/lcr/lcr_ifact.h | |
269 | %dir %{_includedir}/corosync/engine | |
270 | %{_includedir}/corosync/engine/config.h | |
271 | %{_includedir}/corosync/engine/coroapi.h | |
272 | %{_includedir}/corosync/engine/logsys.h | |
273 | %{_includedir}/corosync/engine/objdb.h | |
274 | %{_includedir}/corosync/engine/quorum.h | |
275 | %{_libdir}/libcfg.so | |
276 | %{_libdir}/libcpg.so | |
277 | %{_libdir}/libconfdb.so | |
278 | %{_libdir}/libevs.so | |
279 | %{_libdir}/libtotem_pg.so | |
280 | %{_libdir}/liblogsys.so | |
281 | %{_libdir}/libcoroipcc.so | |
282 | %{_libdir}/libcoroipcs.so | |
283 | %{_libdir}/libquorum.so | |
284 | %{_libdir}/libvotequorum.so | |
285 | %{_libdir}/libpload.so | |
47ae82b0 | 286 | %{_libdir}/libsam.so |
b5fc4494 FDN |
287 | %{_libdir}/pkgconfig/*.pc |
288 | %{_mandir}/man3/cpg_*3* | |
289 | %{_mandir}/man3/evs_*3* | |
290 | %{_mandir}/man3/confdb_*3* | |
291 | %{_mandir}/man3/votequorum_*3* | |
47ae82b0 | 292 | %{_mandir}/man3/sam_*3* |
b5fc4494 FDN |
293 | %{_mandir}/man8/cpg_overview.8* |
294 | %{_mandir}/man8/evs_overview.8* | |
295 | %{_mandir}/man8/confdb_overview.8* | |
296 | %{_mandir}/man8/logsys_overview.8* | |
297 | %{_mandir}/man8/votequorum_overview.8* | |
298 | %{_mandir}/man8/coroipc_overview.8* | |
47ae82b0 | 299 | %{_mandir}/man8/sam_overview.8* |
b5fc4494 FDN |
300 | |
301 | %changelog | |
b2400314 | 302 | * @date@ Autotools generated version <nobody@nowhere.org> - @version@-1-@numcomm@.@alphatag@.@dirty@ |
b5fc4494 | 303 | - Autotools generated version |