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