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