]> git.pld-linux.org Git - packages/corosync.git/blob - corosync.spec
- updated to 2.3.4 (note: new libvotequorum soname)
[packages/corosync.git] / corosync.spec
1 #
2 # Conditional build:
3 %bcond_without  apidocs         # build apidocs (some man3 pages are provided anyway)
4 %bcond_without  augeas          # augeas lens support
5 %bcond_without  dbus            # DBus events
6 %bcond_without  rdma            # RDMA support
7 %bcond_without  snmp            # SNMP protocol support
8 %bcond_without  testagents      # test agents build
9 %bcond_without  watchdog        # watchdog support
10 %bcond_without  monitoring      # resource monitoring
11 %bcond_with     qdevices        # Quorum devices support [NOP as of 2.3.1]
12 %bcond_without  xmlconf         # XML configuration support
13 #
14 Summary:        Corosync - OSI Certified implementation of a complete cluster engine
15 Summary(pl.UTF-8):      Corosync - implementacja silnika klastrowego certyfikowana przez OSI
16 Name:           corosync
17 Version:        2.3.4
18 Release:        1
19 License:        BSD
20 Group:          Base
21 Source0:        http://corosync.org/download/%{name}-%{version}.tar.gz
22 # Source0-md5:  4b0f36a1dc014527e5b192265dbd7e70
23 Source1:        %{name}.init
24 Source2:        %{name}-notifyd.init
25 Source3:        %{name}-notifyd.sysconfig
26 URL:            http://www.corosync.org/
27 BuildRequires:  autoconf >= 2.61
28 BuildRequires:  automake
29 %{?with_dbus:BuildRequires:     dbus-devel}
30 %{?with_apidocs:BuildRequires:  doxygen}
31 %{?with_apidocs:BuildRequires:  graphviz}
32 BuildRequires:  groff
33 BuildRequires:  libqb-devel
34 %{?with_monitoring:BuildRequires:       libstatgrab-devel}
35 %if %{with rdma}
36 BuildRequires:  libibverbs-devel
37 BuildRequires:  librdmacm-devel
38 %endif
39 BuildRequires:  libtool >= 2:2.2.6
40 %{?with_snmp:BuildRequires:     net-snmp-devel}
41 BuildRequires:  nss-devel
42 BuildRequires:  pkgconfig
43 BuildRequires:  rpmbuild(macros) >= 1.644
44 %{?with_xmlconf:Requires:       libxslt-progs}
45 Requires:       rc-scripts
46 Requires:       systemd-units >= 38
47 Requires(post,preun):   /sbin/chkconfig
48 Requires:       %{name}-libs = %{version}-%{release}
49 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
50
51 # short_service_name_get() is defined in executable
52 %define         skip_post_check_so      libcoroipcs\.so.*
53
54 %description
55 The Corosync Cluster Engine is an OSI Certified implementation of a
56 complete cluster engine.
57
58 %description -l pl.UTF-8
59 Corosync Cluster Engine to implementacja pełnego silnika klastrowego
60 certyfikowana przez OSI.
61
62 %package libs
63 Summary:        Corosync Cluster Engine libraries
64 Summary(pl.UTF-8):      Biblioteki silnika klastrowego Corosync
65 Group:          Libraries
66
67 %description libs
68 This package contains the libraries of Corosync Cluster Engine, an OSI
69 Certified implementation of a complete cluster engine.
70
71 %description libs -l pl.UTF-8
72 Ten pakiet zawiera biblioteki Corosync Cluster Engine - pełnego
73 silnika klastrowego certyfikowanego przez OSI.
74
75 %package devel
76 Summary:        Header files for Corosync libraries
77 Summary(pl.UTF-8):      Pliki nagłówkowe bibliotek Corosync
78 Group:          Development/Libraries
79 Requires:       %{name}-libs = %{version}-%{release}
80 Conflicts:      openais-devel < 1.0
81
82 %description devel
83 This package contains the include files used to develop using Corosync
84 APIs.
85
86 %description devel -l pl.UTF-8
87 Ten pakiet zawiera pliki nagłówkowe potrzebne do tworzenia programów z
88 użyciem API Corosync.
89
90 %package static
91 Summary:        Corosync static libraries
92 Summary(pl.UTF-8):      Statyczne biblioteki Corosync
93 Group:          Development/Libraries
94 Requires:       %{name}-devel = %{version}-%{release}
95
96 %description static
97 This package contains the Corosync static libraries.
98
99 %description static -l pl.UTF-8
100 Ten pakiet zawiera statyczne biblioteki Corosync.
101
102 %package testagents
103 Summary:        The Corosync Cluster Engine test agents
104 Summary(pl.UTF-8):      Testowi agenci silnika klastrowego Corosync
105 Group:          Development/Libraries
106 Requires:       %{name} = %{version}-%{release}
107
108 %description testagents
109 This package contains Corosync test agents.
110
111 %description testagents -l pl.UTF-8
112 Ten pakiet zawiera testowych agentów silnika Corosync.
113
114 %package -n mibs-corosync
115 Summary:        Corosync SNMP MIB data
116 Summary(pl.UTF-8):      Dane SNMP MIB dla Corosync
117 Group:          Applications/System
118 Requires:       mibs-dirs
119
120 %description -n mibs-corosync
121 Corosync SNMP MIB data.
122
123 %description -n mibs-corosync -l pl.UTF-8
124 Dane SNMP MIB dla Corosync.
125
126 %prep
127 %setup -q
128
129 %build
130 %{__libtoolize}
131 %{__aclocal}
132 %{__autoconf}
133 %{__autoheader}
134 %{__automake}
135 %configure \
136         %{?with_augeas:--enable-augeas} \
137         %{?with_dbus:--enable-dbus} \
138         %{?with_monitoring:--enable-monitoring} \
139         %{?with_qdevices:--enable-qdevices} \
140         %{?with_rdma:--enable-rdma} \
141         --disable-silent-rules \
142         %{?with_snmp:--enable-snmp} \
143         --enable-systemd \
144         %{?with_testagents:--enable-testagents} \
145         %{?with_watchdog:--enable-watchdog} \
146         %{?with_xmlconf:--enable-xmlconf} \
147         --with-initddir=/etc/rc.d/init.d \
148         --with-systemddir=%{systemdunitdir}
149
150 %{__make}
151
152 %{?with_apidocs:%{__make} doxygen}
153
154 %install
155 rm -rf $RPM_BUILD_ROOT
156 install -d $RPM_BUILD_ROOT{/etc/rc.d/init.d,/etc/sysconfig}
157 install -d $RPM_BUILD_ROOT/var/log/cluster
158
159 %{__make} install \
160         mibdir=%{_datadir}/mibs \
161         DESTDIR=$RPM_BUILD_ROOT
162
163 %{__rm} -r $RPM_BUILD_ROOT%{_docdir}/corosync
164
165 sed -e 's/^/#/' $RPM_BUILD_ROOT%{_sysconfdir}/corosync/corosync.conf.example \
166         >$RPM_BUILD_ROOT%{_sysconfdir}/corosync/corosync.conf
167 %{__rm} $RPM_BUILD_ROOT%{_sysconfdir}/corosync/corosync.conf.example*
168
169 install %{SOURCE1} $RPM_BUILD_ROOT/etc/rc.d/init.d/%{name}
170 install %{SOURCE2} $RPM_BUILD_ROOT/etc/rc.d/init.d/%{name}-notifyd
171 install %{SOURCE3} $RPM_BUILD_ROOT/etc/sysconfig/%{name}-notifyd
172
173 # obsoleted by pkg-config
174 %{__rm} $RPM_BUILD_ROOT%{_libdir}/lib*.la
175
176 %clean
177 rm -rf $RPM_BUILD_ROOT
178
179 %post
180 /sbin/chkconfig --add %{name}
181 /sbin/chkconfig --add %{name}-notifyd
182 %service %{name}-notifyd restart
183 %systemd_post %{name}-notifyd.service
184 export NORESTART=1
185 %systemd_post %{name}.service
186
187 %preun
188 if [ "$1" = "0" ]; then
189         %service -q %{name} stop
190         /sbin/chkconfig --del %{name}
191         %service -q %{name}-notifyd stop
192         /sbin/chkconfig --del %{name}-notifyd
193 fi
194 %systemd_preun %{name}.service
195 %systemd_preun %{name}-notifyd.service
196
197 %postun
198 %systemd_reload
199
200 %post   libs -p /sbin/ldconfig
201 %postun libs -p /sbin/ldconfig
202
203 %files
204 %defattr(644,root,root,755)
205 %doc AUTHORS ChangeLog LICENSE README.recovery SECURITY conf/corosync.conf.example*
206 %if %{with xmlconf}
207 %doc conf/corosync.xml.example*
208 %endif
209 %attr(754,root,root) /etc/rc.d/init.d/corosync
210 %attr(754,root,root) /etc/rc.d/init.d/corosync-notifyd
211 %verify(not md5 mtime size) %config(noreplace) /etc/sysconfig/%{name}-notifyd
212 %dir %{_sysconfdir}/corosync
213 %{systemdunitdir}/corosync.service
214 %{systemdunitdir}/corosync-notifyd.service
215 %verify(not md5 mtime size) %config(noreplace) %{_sysconfdir}/corosync/corosync.conf
216 %attr(755,root,root) %{_bindir}/corosync-blackbox
217 %attr(755,root,root) %{_sbindir}/corosync
218 %attr(755,root,root) %{_sbindir}/corosync-cfgtool
219 %attr(755,root,root) %{_sbindir}/corosync-cmapctl
220 %attr(755,root,root) %{_sbindir}/corosync-cpgtool
221 %attr(755,root,root) %{_sbindir}/corosync-keygen
222 %attr(755,root,root) %{_sbindir}/corosync-notifyd
223 %attr(755,root,root) %{_sbindir}/corosync-quorumtool
224 %{_mandir}/man5/corosync.conf.5*
225 %{_mandir}/man5/votequorum.5*
226 %{_mandir}/man8/corosync.8*
227 %{_mandir}/man8/corosync-blackbox.8*
228 %{_mandir}/man8/corosync-cmapctl.8*
229 %{_mandir}/man8/corosync-cfgtool.8*
230 %{_mandir}/man8/corosync-cpgtool.8*
231 %{_mandir}/man8/corosync-keygen.8*
232 %{_mandir}/man8/corosync-notifyd.8*
233 %{_mandir}/man8/corosync-quorumtool.8*
234 # should be man7...
235 %{_mandir}/man8/cmap_keys.8*
236 %{_mandir}/man8/cmap_overview.8*
237 %{_mandir}/man8/corosync_overview.8*
238 %{_mandir}/man8/cpg_overview.8*
239 %{_mandir}/man8/sam_overview.8*
240 %{_mandir}/man8/votequorum_overview.8*
241 %{_mandir}/man8/quorum_overview.8*
242 %dir %{_datadir}/corosync
243 %attr(755,root,root) %{_datadir}/%{name}/corosync
244 %attr(755,root,root) %{_datadir}/%{name}/corosync-notifyd
245 %if %{with xmlconf}
246 %attr(755,root,root) %{_bindir}/corosync-xmlproc
247 %config(noreplace) %{_sysconfdir}/corosync/corosync.xml.example
248 %dir %{_datadir}/corosync/xml2conf.xsl
249 %{_mandir}/man8/corosync-xmlproc.8*
250 %{_mandir}/man5/corosync.xml.5*
251 %endif
252 %if %{with augeas}
253 %{_datadir}/augeas/lenses/corosync.aug
254 %{_datadir}/augeas/lenses/tests/test_corosync.aug
255 %endif
256 %if %{with dbus}
257 /etc/dbus-1/system.d/corosync-signals.conf
258 %endif
259 /var/lib/corosync
260 %attr(700,root,root) %dir /var/log/cluster
261
262 %files libs
263 %defattr(644,root,root,755)
264 %attr(755,root,root) %{_libdir}/libcfg.so.6.*.*
265 %attr(755,root,root) %ghost %{_libdir}/libcfg.so.6
266 %attr(755,root,root) %{_libdir}/libcmap.so.4.*.*
267 %attr(755,root,root) %ghost %{_libdir}/libcmap.so.4
268 %attr(755,root,root) %{_libdir}/libcorosync_common.so.4.*.*
269 %attr(755,root,root) %ghost %{_libdir}/libcorosync_common.so.4
270 %attr(755,root,root) %{_libdir}/libcpg.so.4.*.*
271 %attr(755,root,root) %ghost %{_libdir}/libcpg.so.4
272 %attr(755,root,root) %{_libdir}/libsam.so.4.*.*
273 %attr(755,root,root) %ghost %{_libdir}/libsam.so.4
274 %attr(755,root,root) %{_libdir}/libquorum.so.5.*.*
275 %attr(755,root,root) %ghost %{_libdir}/libquorum.so.5
276 %attr(755,root,root) %{_libdir}/libtotem_pg.so.5.*.*
277 %attr(755,root,root) %ghost %{_libdir}/libtotem_pg.so.5
278 %attr(755,root,root) %{_libdir}/libvotequorum.so.7.*.*
279 %attr(755,root,root) %ghost %{_libdir}/libvotequorum.so.7
280
281 %files devel
282 %defattr(644,root,root,755)
283 %{?with_apidocs:%doc doc/api/html/*}
284 %attr(755,root,root) %{_libdir}/libcfg.so
285 %attr(755,root,root) %{_libdir}/libcmap.so
286 %attr(755,root,root) %{_libdir}/libcorosync_common.so
287 %attr(755,root,root) %{_libdir}/libcpg.so
288 %attr(755,root,root) %{_libdir}/libsam.so
289 %attr(755,root,root) %{_libdir}/libquorum.so
290 %attr(755,root,root) %{_libdir}/libtotem_pg.so
291 %attr(755,root,root) %{_libdir}/libvotequorum.so
292 %{_includedir}/corosync
293 %{_pkgconfigdir}/corosync.pc
294 %{_pkgconfigdir}/libcfg.pc
295 %{_pkgconfigdir}/libcmap.pc
296 %{_pkgconfigdir}/libcorosync_common.pc
297 %{_pkgconfigdir}/libcpg.pc
298 %{_pkgconfigdir}/libquorum.pc
299 %{_pkgconfigdir}/libsam.pc
300 %{_pkgconfigdir}/libtotem_pg.pc
301 %{_pkgconfigdir}/libvotequorum.pc
302 %{_mandir}/man3/cmap_*.3*
303 %{_mandir}/man3/cpg_*.3*
304 %{_mandir}/man3/quorum_*.3*
305 %{_mandir}/man3/sam_*.3*
306 %{_mandir}/man3/votequorum_*.3*
307
308 %files static
309 %defattr(644,root,root,755)
310 %{_libdir}/libcfg.a
311 %{_libdir}/libcmap.a
312 %{_libdir}/libcorosync_common.a
313 %{_libdir}/libcpg.a
314 %{_libdir}/libsam.a
315 %{_libdir}/libquorum.a
316 %{_libdir}/libtotem_pg.a
317 %{_libdir}/libvotequorum.a
318
319 %if %{with testagents}
320 %files testagents
321 %defattr(644,root,root,755)
322 %attr(755,root,root) %{_bindir}/cpg_test_agent
323 %attr(755,root,root) %{_bindir}/sam_test_agent
324 %attr(755,root,root) %{_bindir}/votequorum_test_agent
325 %dir %{_datadir}/corosync/tests
326 %{_datadir}/corosync/tests/mem_leak_test.sh
327 %{_datadir}/corosync/tests/net_breaker.sh
328 %{_datadir}/corosync/tests/cmap-dispatch-deadlock.sh
329 %{_datadir}/corosync/tests/shm_leak_audit.sh
330 %endif
331
332 %if %{with snmp}
333 %files -n mibs-corosync
334 %defattr(644,root,root,755)
335 %{_datadir}/mibs/COROSYNC-MIB.txt
336 %endif
This page took 0.106541 seconds and 4 git commands to generate.