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