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