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