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