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