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