]> git.proxmox.com Git - mirror_corosync.git/blob - corosync.spec.in
specfile: Install corosync-signals.conf for dbus
[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 %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
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
109 %description
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
114 if [ $1 -eq 1 ]; then
115 /sbin/chkconfig --add corosync || :
116 fi
117
118 %preun
119 if [ $1 -eq 0 ]; then
120 /sbin/service corosync stop &>/dev/null || :
121 /sbin/chkconfig --del corosync || :
122 fi
123
124 %files
125 %defattr(-,root,root,-)
126 %doc LICENSE SECURITY
127 %{_bindir}/corosync-blackbox
128 %{_sbindir}/corosync
129 %{_sbindir}/corosync-keygen
130 %{_sbindir}/corosync-objctl
131 %{_sbindir}/corosync-cfgtool
132 %{_sbindir}/corosync-fplay
133 %{_sbindir}/corosync-pload
134 %{_sbindir}/corosync-cpgtool
135 %{_sbindir}/corosync-quorumtool
136 %{_sbindir}/corosync-notifyd
137 %{_bindir}/corosync-blackbox
138 %dir %{_sysconfdir}/corosync
139 %dir %{_sysconfdir}/corosync/service.d
140 %dir %{_sysconfdir}/corosync/uidgid.d
141 %config(noreplace) %{_sysconfdir}/corosync/corosync.conf.example
142 %config(noreplace) %{_sysconfdir}/corosync/corosync.conf.example.udpu
143 %if %{with dbus}
144 %{_sysconfdir}/dbus-1/system.d/corosync-signals.conf
145 %endif
146 %if %{with snmp}
147 %{_datadir}/snmp/mibs/COROSYNC-MIB.txt
148 %endif
149 %{_initrddir}/corosync
150 %{_initrddir}/corosync-notifyd
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
163 %if %{with watchdog}
164 %{_libexecdir}/lcrso/service_wd.lcrso
165 %endif
166 %if %{with monitoring}
167 %{_libexecdir}/lcrso/service_mon.lcrso
168 %endif
169 %dir %{_localstatedir}/lib/corosync
170 %dir %{_localstatedir}/log/cluster
171 %{_mandir}/man8/corosync_overview.8*
172 %{_mandir}/man8/corosync.8*
173 %{_mandir}/man8/corosync-blackbox.8*
174 %{_mandir}/man8/corosync-objctl.8*
175 %{_mandir}/man8/corosync-keygen.8*
176 %{_mandir}/man8/corosync-cfgtool.8*
177 %{_mandir}/man8/corosync-cpgtool.8*
178 %{_mandir}/man8/corosync-fplay.8*
179 %{_mandir}/man8/corosync-pload.8*
180 %{_mandir}/man8/corosync-notifyd.8*
181 %{_mandir}/man8/corosync-quorumtool.8*
182 %{_mandir}/man5/corosync.conf.5*
183
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
202 %{_bindir}/confdb_test_agent
203 %{_bindir}/sam_test_agent
204 %{_bindir}/votequorum_test_agent
205 %{_libexecdir}/lcrso/service_syncv2.lcrso
206
207 %endif
208
209 # library
210 #
211 %package -n corosynclib
212 Summary: The Corosync Cluster Engine Libraries
213 Group: System Environment/Libraries
214 Requires: %{name} = %{version}-%{release}
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.*
233 %{_libdir}/libsam.so.*
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
268 %{_includedir}/corosync/sam.h
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
298 %{_libdir}/libsam.so
299 %{_libdir}/pkgconfig/*.pc
300 %{_mandir}/man3/cpg_*3*
301 %{_mandir}/man3/evs_*3*
302 %{_mandir}/man3/confdb_*3*
303 %{_mandir}/man3/votequorum_*3*
304 %{_mandir}/man3/sam_*3*
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*
311 %{_mandir}/man8/sam_overview.8*
312
313 %changelog
314 * @date@ Autotools generated version <nobody@nowhere.org> - @version@-1-@numcomm@.@alphatag@.@dirty@
315 - Autotools generated version