]> git.pld-linux.org Git - packages/corosync.git/blame - corosync.spec
make sysconfig/corosync-notifyd usable for systemd
[packages/corosync.git] / corosync.spec
CommitLineData
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 12Summary: Corosync - OSI Certified implementation of a complete cluster engine
a1f7a440 13Summary(pl.UTF-8): Corosync - implementacja silnika klastrowego certyfikowana przez OSI
ab0d79a4 14Name: corosync
37d86914 15Version: 2.1.0
ac647687 16Release: 3
ab0d79a4 17License: BSD
18Group: Base
37d86914
JK
19Source0: https://github.com/downloads/corosync/corosync/corosync-2.1.0.tar.gz
20# Source0-md5: dc5152e6dfdb4638ab544e587884483a
baa29f3f
JK
21Source1: %{name}.init
22Source2: %{name}-notifyd.init
23Source3: %{name}-notifyd.sysconfig
37d86914
JK
24Patch0: %{name}-lib_deps.patch
25Patch1: %{name}-install.patch
a0c966cc 26Patch2: %{name}-notifyd_service.patch
ab0d79a4 27URL: http://www.corosync.org/
a1f7a440 28BuildRequires: autoconf >= 2.61
ab0d79a4 29BuildRequires: automake
4169d0ae 30%{?with_dbus:BuildRequires: dbus-devel}
2805ff24 31%{?with_apidocs:BuildRequires: doxygen}
5a02a01c 32BuildRequires: libqb-devel
37d86914 33%{?with_monitoring:BuildRequires: libstatgrab-devel}
2805ff24
JB
34%if %{with rdma}
35BuildRequires: libibverbs-devel
37d86914 36BuildRequires: libtool
2805ff24
JB
37BuildRequires: librdmacm-devel
38%endif
5a02a01c 39%{?with_xmlconf:BuildRequires: libxslt}
4169d0ae 40%{?with_snmp:BuildRequires: net-snmp-devel}
40252af1 41BuildRequires: nss-devel
9d8c645a 42BuildRequires: pkgconfig
a1f7a440 43Requires: %{name}-libs = %{version}-%{release}
ab0d79a4 44BuildRoot: %{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
50The Corosync Cluster Engine is an OSI Certified implementation of a
51complete cluster engine.
52
a1f7a440
JB
53%description -l pl.UTF-8
54Corosync Cluster Engine to implementacja pełnego silnika klastrowego
55certyfikowana przez OSI.
56
ab0d79a4 57%package libs
a1f7a440
JB
58Summary: Corosync Cluster Engine libraries
59Summary(pl.UTF-8): Biblioteki silnika klastrowego Corosync
ab0d79a4 60Group: Libraries
61
62%description libs
a1f7a440
JB
63This package contains the libraries of Corosync Cluster Engine, an OSI
64Certified implementation of a complete cluster engine.
65
66%description libs -l pl.UTF-8
a1e347d6 67Ten pakiet zawiera biblioteki Corosync Cluster Engine - pełnego
68silnika klastrowego certyfikowanego przez OSI.
ab0d79a4 69
70%package devel
a1f7a440
JB
71Summary: Header files for Corosync libraries
72Summary(pl.UTF-8): Pliki nagłówkowe bibliotek Corosync
ab0d79a4 73Group: Development/Libraries
74Requires: %{name}-libs = %{version}-%{release}
3398ab62 75Conflicts: openais-devel < 1.0
ab0d79a4 76
77%description devel
a1f7a440 78This package contains the include files used to develop using Corosync
ab0d79a4 79APIs.
80
a1f7a440
JB
81%description devel -l pl.UTF-8
82Ten pakiet zawiera pliki nagłówkowe potrzebne do tworzenia programów z
83użyciem API Corosync.
84
ab0d79a4 85%package static
a1f7a440
JB
86Summary: Corosync static libraries
87Summary(pl.UTF-8): Statyczne biblioteki Corosync
ab0d79a4 88Group: Development/Libraries
89Requires: %{name}-devel = %{version}-%{release}
90
91%description static
a1f7a440
JB
92This package contains the Corosync static libraries.
93
94%description static -l pl.UTF-8
95Ten pakiet zawiera statyczne biblioteki Corosync.
ab0d79a4 96
4169d0ae
JB
97%package -n mibs-corosync
98Summary: Corosync SNMP MIB data
99Summary(pl.UTF-8): Dane SNMP MIB dla Corosync
100Group: Applications/System
101Requires: mibs-dirs
102
103%description -n mibs-corosync
104Corosync SNMP MIB data.
105
106%description -n mibs-corosync -l pl.UTF-8
107Dane SNMP MIB dla Corosync.
108
5a02a01c
JK
109%package -n corosync-testagents
110Summary: The Corosync Cluster Engine Test Agents
111Group: Development/Libraries
112Requires: %{name} = %{version}-%{release}
113
114%description -n corosync-testagents
115This 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
146rm -rf $RPM_BUILD_ROOT
baa29f3f 147install -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
154sed -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
158install %{SOURCE1} $RPM_BUILD_ROOT/etc/rc.d/init.d/%{name}
159install %{SOURCE2} $RPM_BUILD_ROOT/etc/rc.d/init.d/%{name}-notifyd
160install %{SOURCE3} $RPM_BUILD_ROOT/etc/sysconfig/%{name}-notifyd
161
ab0d79a4 162%clean
163rm -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
174if [ "$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 179fi
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
This page took 0.259703 seconds and 4 git commands to generate.