]> git.proxmox.com Git - mirror_corosync.git/blob - corosync.spec.in
Change the last references from objctl to cmapctl
[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 %bcond_with systemd
15 %bcond_with nss
16
17 Name: corosync
18 Summary: The Corosync Cluster Engine and Application Programming Interfaces
19 Version: @version@
20 Release: 1%{?numcomm:.%{numcomm}}%{?alphatag:.%{alphatag}}%{?dirty:.%{dirty}}%{?dist}
21 License: BSD
22 Group: System Environment/Base
23 URL: http://ftp.corosync.org
24 Source0: ftp://ftp:user@ftp.corosync.org/downloads/%{name}-%{version}/%{name}-%{version}%{?numcomm:.%{numcomm}}%{?alphatag:-%{alphatag}}%{?dirty:-%{dirty}}.tar.gz
25
26 # Runtime bits
27 Requires: corosynclib = %{version}-%{release}
28 Requires(pre): /usr/sbin/useradd
29 Requires(post): /sbin/chkconfig
30 Requires(preun): /sbin/chkconfig
31 Conflicts: openais <= 0.89, openais-devel <= 0.89
32
33 # Build bits
34
35 %define buildtrunk 0
36 %{?_with_buildtrunk: %define buildtrunk 1}
37
38 BuildRequires: libqb-devel
39 %if %{buildtrunk}
40 BuildRequires: autoconf automake
41 %endif
42 %if %{with nss}
43 BuildRequires: nss-devel
44 %endif
45 %if %{with rdma}
46 BuildRequires: libibverbs-devel librdmacm-devel
47 %endif
48 %if %{with snmp}
49 BuildRequires: net-snmp-devel
50 %endif
51 %if %{with dbus}
52 BuildRequires: dbus-devel
53 %endif
54 %if %{with systemd}
55 BuildRequires: systemd-units
56 %endif
57 %if %{with xmlconf}
58 Requires: libxslt
59 %endif
60
61 BuildRoot: %(mktemp -ud %{_tmppath}/%{name}-%{version}-%{release}-XXXXXX)
62
63 %prep
64 %setup -q -n %{name}-%{version}%{?numcomm:.%{numcomm}}%{?alphatag:-%{alphatag}}%{?dirty:-%{dirty}}
65
66 %build
67 %if %{buildtrunk}
68 ./autogen.sh
69 %endif
70
71 %if %{with rdma}
72 export ibverbs_CFLAGS=-I/usr/include/infiniband \
73 export ibverbs_LIBS=-libverbs \
74 export rdmacm_CFLAGS=-I/usr/include/rdma \
75 export rdmacm_LIBS=-lrdmacm \
76 %endif
77 %{configure} \
78 %if %{with nss}
79 --enable-nss \
80 %else
81 --disable-nss \
82 %endif
83 %if %{with testagents}
84 --enable-testagents \
85 %endif
86 %if %{with watchdog}
87 --enable-watchdog \
88 %endif
89 %if %{with monitoring}
90 --enable-monitoring \
91 %endif
92 %if %{with snmp}
93 --enable-snmp \
94 %endif
95 %if %{with dbus}
96 --enable-dbus \
97 %endif
98 %if %{with rdma}
99 --enable-rdma \
100 %endif
101 %if %{with systemd}
102 --enable-systemd \
103 %endif
104 --with-initddir=%{_initrddir}
105
106 make %{_smp_mflags}
107
108 %install
109 rm -rf %{buildroot}
110
111 make install DESTDIR=%{buildroot}
112
113 %if %{with dbus}
114 mkdir -p -m 0700 %{buildroot}/%{_sysconfdir}/dbus-1/system.d
115 install -m 644 %{_builddir}/%{name}-%{version}/conf/corosync-signals.conf %{buildroot}/%{_sysconfdir}/dbus-1/system.d/corosync-signals.conf
116 %endif
117
118 ## tree fixup
119 # drop static libs
120 rm -f %{buildroot}%{_libdir}/*.a
121 # drop docs and html docs for now
122 rm -rf %{buildroot}%{_docdir}/*
123
124 %clean
125 rm -rf %{buildroot}
126
127 %description
128 This package contains the Corosync Cluster Engine Executive, several default
129 APIs and libraries, default configuration files, and an init script.
130
131 %post
132 if [ $1 -eq 1 ]; then
133 /sbin/chkconfig --add corosync || :
134 fi
135
136 %preun
137 if [ $1 -eq 0 ]; then
138 /sbin/service corosync stop &>/dev/null || :
139 /sbin/chkconfig --del corosync || :
140 fi
141
142 %files
143 %defattr(-,root,root,-)
144 %doc LICENSE SECURITY
145 %{_sbindir}/corosync
146 %{_sbindir}/corosync-keygen
147 %{_sbindir}/corosync-cmapctl
148 %{_sbindir}/corosync-cfgtool
149 %{_sbindir}/corosync-fplay
150 %{_sbindir}/corosync-pload
151 %{_sbindir}/corosync-cpgtool
152 %{_sbindir}/corosync-quorumtool
153 %{_sbindir}/corosync-notifyd
154 %{_bindir}/corosync-blackbox
155 %if %{with xmlconf}
156 %{_bindir}/corosync-xmlproc
157 %endif
158 %dir %{_sysconfdir}/corosync
159 %dir %{_sysconfdir}/corosync/uidgid.d
160 %config(noreplace) %{_sysconfdir}/corosync/corosync.conf.example
161 %config(noreplace) %{_sysconfdir}/corosync/corosync.conf.example.udpu
162 %if %{with dbus}
163 %{_sysconfdir}/dbus-1/system.d/corosync-signals.conf
164 %endif
165 %if %{with snmp}
166 %{_datadir}/snmp/mibs/COROSYNC-MIB.txt
167 %endif
168 %if %{with systemd}
169 %{_unitdir}/corosync.service
170 %{_unitdir}/corosync-notifyd.service
171 %else
172 %{_initrddir}/corosync
173 %{_initrddir}/corosync-notifyd
174 %endif
175 %dir %{_localstatedir}/lib/corosync
176 %dir %{_localstatedir}/log/cluster
177 %{_mandir}/man8/corosync_overview.8*
178 %{_mandir}/man8/corosync.8*
179 %{_mandir}/man8/corosync-blackbox.8*
180 %{_mandir}/man8/corosync-cmapctl.8*
181 %{_mandir}/man8/corosync-keygen.8*
182 %{_mandir}/man8/corosync-cfgtool.8*
183 %{_mandir}/man8/corosync-cpgtool.8*
184 %{_mandir}/man8/corosync-fplay.8*
185 %{_mandir}/man8/corosync-pload.8*
186 %{_mandir}/man8/corosync-notifyd.8*
187 %{_mandir}/man8/corosync-quorumtool.8*
188 %{_mandir}/man5/corosync.conf.5*
189
190
191 # optional testagent rpm
192 #
193 %if %{with testagents}
194
195 %package -n corosync-testagents
196 Summary: The Corosync Cluster Engine Test Agents
197 Group: Development/Libraries
198 Requires: %{name} = %{version}-%{release}
199
200 %description -n corosync-testagents
201 This package contains corosync test agents.
202
203 %files -n corosync-testagents
204 %defattr(755,root,root,-)
205 %{_datadir}/corosync/tests/mem_leak_test.sh
206 %{_datadir}/corosync/tests/net_breaker.sh
207 %{_datadir}/corosync/tests/cmap-dispatch-deadlock.sh
208 %{_datadir}/corosync/tests/shm_leak_audit.sh
209 %{_bindir}/cpg_test_agent
210 %{_bindir}/sam_test_agent
211 %{_bindir}/votequorum_test_agent
212
213 %endif
214
215 # library
216 #
217 %package -n corosynclib
218 Summary: The Corosync Cluster Engine Libraries
219 Group: System Environment/Libraries
220 Requires: %{name} = %{version}-%{release}
221
222 %description -n corosynclib
223 This package contains corosync libraries.
224
225 %files -n corosynclib
226 %defattr(-,root,root,-)
227 %doc LICENSE
228 %{_libdir}/libcfg.so.*
229 %{_libdir}/libcpg.so.*
230 %{_libdir}/libcmap.so.*
231 %{_libdir}/libevs.so.*
232 %{_libdir}/libtotem_pg.so.*
233 %{_libdir}/libquorum.so.*
234 %{_libdir}/libvotequorum.so.*
235 %{_libdir}/libpload.so.*
236 %{_libdir}/libsam.so.*
237
238 %post -n corosynclib -p /sbin/ldconfig
239
240 %postun -n corosynclib -p /sbin/ldconfig
241
242 %package -n corosynclib-devel
243 Summary: The Corosync Cluster Engine Development Kit
244 Group: Development/Libraries
245 Requires: corosynclib = %{version}-%{release}
246 Requires: pkgconfig
247 Provides: corosync-devel = %{version}
248 Obsoletes: corosync-devel < 0.92-7
249
250 %description -n corosynclib-devel
251 This package contains include files and man pages used to develop using
252 The Corosync Cluster Engine APIs.
253
254 %files -n corosynclib-devel
255 %defattr(-,root,root,-)
256 %doc LICENSE
257 %dir %{_includedir}/corosync/
258 %{_includedir}/corosync/cs_config.h
259 %{_includedir}/corosync/corodefs.h
260 %{_includedir}/corosync/cfg.h
261 %{_includedir}/corosync/cmap.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/totem.h
274 %{_includedir}/corosync/totem/totemip.h
275 %{_includedir}/corosync/totem/totempg.h
276 %dir %{_includedir}/corosync/engine
277 %{_includedir}/corosync/engine/quorum.h
278 %{_libdir}/libcfg.so
279 %{_libdir}/libcpg.so
280 %{_libdir}/libcmap.so
281 %{_libdir}/libevs.so
282 %{_libdir}/libtotem_pg.so
283 %{_libdir}/libquorum.so
284 %{_libdir}/libvotequorum.so
285 %{_libdir}/libpload.so
286 %{_libdir}/libsam.so
287 %{_libdir}/pkgconfig/*.pc
288 %{_mandir}/man3/cpg_*3*
289 %{_mandir}/man3/evs_*3*
290 %{_mandir}/man3/quorum_*3*
291 %{_mandir}/man3/votequorum_*3*
292 %{_mandir}/man3/sam_*3*
293 %{_mandir}/man8/cpg_overview.8*
294 %{_mandir}/man8/evs_overview.8*
295 %{_mandir}/man8/votequorum_overview.8*
296 %{_mandir}/man8/sam_overview.8*
297
298 %changelog
299 * @date@ Autotools generated version <nobody@nowhere.org> - @version@-1-@numcomm@.@alphatag@.@dirty@
300 - Autotools generated version