# # spec file for package corosync # # Copyright (c) 2012 SUSE LINUX Products GmbH, Nuernberg, Germany. # # All modifications and additions to the file contributed by third parties # remain the property of their copyright owners, unless otherwise agreed # upon. The license for this file, and modifications and additions to the # file, is the same license as for the pristine package itself (unless the # license for the pristine package is not an Open Source License, in which # case the license is the MIT License). An "Open Source License" is a # license that conforms to the Open Source Definition (Version 1.9) # published by the Open Source Initiative. # Please submit bugfixes or comments via http://bugs.opensuse.org/ # %if 0%{?sles_version} == 11 %ifnarch s390 s390x %define buildib 1 %endif %endif %if 0%{?suse_version} %define _libexecdir %{_libdir} %endif Name: corosync Summary: The Corosync Cluster Engine and Application Programming Interfaces License: BSD-3-Clause Group: Productivity/Clustering/HA Version: 1.4.1 Release: 0 Url: http://www.corosync.org Source0: http://developer.osdl.org/dev/openais/downloads/%{name}-%{version}/%{name}-%{version}.tar.bz2 Source2: baselibs.conf Patch1: corosync-confexample-timestamp.patch Patch2: corosync-revert-cs2429.patch Patch4: corosync.conf.example.patch Patch5: corosync-cpg-procdown.patch BuildRoot: %{_tmppath}/%{name}-%{version}-build # Runtime bits Requires: libcorosync4 = %{version}-%{release} Requires(pre): /usr/sbin/useradd Requires(post): /sbin/chkconfig Requires(preun): /sbin/chkconfig Conflicts: openais <= 0.89, libopenais2 <= 0.89, libopenais-devel <= 0.89 %define buildtrunk 1 %{?_with_buildtrunk: %define buildtrunk 1} %if 0%{?buildtrunk} == 1 BuildRequires: autoconf BuildRequires: automake %endif BuildRequires: mozilla-nss BuildRequires: mozilla-nss-devel %if 0%{?buildib} == 1 BuildRequires: libibverbs-devel BuildRequires: librdmacm-devel %endif BuildRequires: pkg-config %prep %setup -q -n %{name}-%{version} %patch1 -p1 %patch2 -p1 %patch4 -p1 %patch5 -p1 %build %if 0%{?buildtrunk} == 1 ./autogen.sh %endif %if 0%{?buildib} == 1 export ibverbs_CFLAGS=-I/usr/include/infiniband \ export ibverbs_LIBS=-libverbs \ export rdmacm_CFLAGS=-I/usr/include/rdma \ export rdmacm_LIBS=-lrdmacm \ %{configure} \ --enable-nss \ --enable-rdma %else %{configure} \ --enable-nss %endif make %{_smp_mflags} %install make install DESTDIR=%{buildroot} # removed to discourage use of init.d/corosync (openais should be # used instead) #%if 0%{?suse_version} #ln -sf ../../etc/init.d/corosync %{buildroot}%{_sbindir}/rccorosync #%endif rm -f %{buildroot}%{_initrddir}/corosync rm -f %{buildroot}%{_initrddir}/corosync-notifyd rm -f %{buildroot}/usr/sbin/corosync-notifyd rm -f %{buildroot}/usr/share/man/man8/corosync-notifyd.8 ## tree fixup # drop static libs rm -f %{buildroot}%{_libdir}/*.a # drop docs and html docs for now rm -rf %{buildroot}%{_docdir}/* # the docdir is /usr/share/doc/ in the configuration rm -rf %{buildroot}%{_datadir}/doc/* %description This package contains the Corosync Cluster Engine Executive, several default APIs and libraries, default configuration files, and an init script. %files %defattr(-,root,root,-) %doc LICENSE SECURITY %{_sbindir}/corosync %{_sbindir}/corosync-keygen %{_sbindir}/corosync-objctl %{_sbindir}/corosync-cfgtool %{_sbindir}/corosync-fplay %{_sbindir}/corosync-pload %{_sbindir}/corosync-cpgtool %{_sbindir}/corosync-quorumtool %{_bindir}/corosync-blackbox %dir %{_sysconfdir}/corosync %dir %{_sysconfdir}/corosync/uidgid.d %dir %{_sysconfdir}/corosync/service.d %config(noreplace) %{_sysconfdir}/corosync/corosync.conf.example %config(noreplace) %{_sysconfdir}/corosync/corosync.conf.example.udpu %dir %{_libexecdir}/lcrso %{_libexecdir}/lcrso/coroparse.lcrso %{_libexecdir}/lcrso/objdb.lcrso %{_libexecdir}/lcrso/service_cfg.lcrso %{_libexecdir}/lcrso/service_cpg.lcrso %{_libexecdir}/lcrso/service_evs.lcrso %{_libexecdir}/lcrso/service_confdb.lcrso %{_libexecdir}/lcrso/service_pload.lcrso %{_libexecdir}/lcrso/quorum_votequorum.lcrso %{_libexecdir}/lcrso/quorum_testquorum.lcrso %{_libexecdir}/lcrso/vsf_quorum.lcrso %{_libexecdir}/lcrso/vsf_ykd.lcrso %dir %{_localstatedir}/lib/corosync %dir %{_localstatedir}/log/cluster %{_mandir}/man8/corosync_overview.8* %{_mandir}/man8/corosync.8* %{_mandir}/man8/corosync-blackbox.8* %{_mandir}/man8/corosync-objctl.8* %{_mandir}/man8/corosync-keygen.8* %{_mandir}/man8/corosync-cfgtool.8* %{_mandir}/man8/corosync-cpgtool.8* %{_mandir}/man8/corosync-fplay.8* %{_mandir}/man8/corosync-pload.8* %{_mandir}/man8/corosync-quorumtool.8* %{_mandir}/man5/corosync.conf.5* %package -n libcorosync4 Summary: The Corosync Cluster Engine Libraries Group: Productivity/Clustering/HA Conflicts: corosync < 0.92-7 Requires: %{name} = %{version}-%{release} %description -n libcorosync4 This package contains corosync libraries. %files -n libcorosync4 %defattr(-,root,root,-) %doc LICENSE %{_libdir}/libcfg.so.* %{_libdir}/libcpg.so.* %{_libdir}/libconfdb.so.* %{_libdir}/libevs.so.* %{_libdir}/libtotem_pg.so.* %{_libdir}/liblogsys.so.* %{_libdir}/libcoroipcc.so.* %{_libdir}/libcoroipcs.so.* %{_libdir}/libquorum.so.* %{_libdir}/libvotequorum.so.* %{_libdir}/libpload.so.* %{_libdir}/libsam.so.* %post -n libcorosync4 -p /sbin/ldconfig %postun -n libcorosync4 -p /sbin/ldconfig %package -n libcorosync-devel Summary: The Corosync Cluster Engine Development Kit Group: Productivity/Clustering/HA Requires: libcorosync4 = %{version}-%{release} Requires: pkgconfig %description -n libcorosync-devel This package contains include files and man pages used to develop using The Corosync Cluster Engine APIs. %files -n libcorosync-devel %defattr(-,root,root,-) %doc LICENSE README.devmap %dir %{_includedir}/corosync/ %{_includedir}/corosync/cs_config.h %{_includedir}/corosync/corodefs.h %{_includedir}/corosync/coroipc_types.h %{_includedir}/corosync/coroipcs.h %{_includedir}/corosync/coroipcc.h %{_includedir}/corosync/cfg.h %{_includedir}/corosync/confdb.h %{_includedir}/corosync/corotypes.h %{_includedir}/corosync/cpg.h %{_includedir}/corosync/evs.h %{_includedir}/corosync/hdb.h %{_includedir}/corosync/list.h %{_includedir}/corosync/mar_gen.h %{_includedir}/corosync/sam.h %{_includedir}/corosync/swab.h %{_includedir}/corosync/quorum.h %{_includedir}/corosync/votequorum.h %dir %{_includedir}/corosync/totem/ %{_includedir}/corosync/totem/coropoll.h %{_includedir}/corosync/totem/totem.h %{_includedir}/corosync/totem/totemip.h %{_includedir}/corosync/totem/totempg.h %dir %{_includedir}/corosync/lcr/ %{_includedir}/corosync/lcr/lcr_ckpt.h %{_includedir}/corosync/lcr/lcr_comp.h %{_includedir}/corosync/lcr/lcr_ifact.h %dir %{_includedir}/corosync/engine %{_includedir}/corosync/engine/config.h %{_includedir}/corosync/engine/coroapi.h %{_includedir}/corosync/engine/logsys.h %{_includedir}/corosync/engine/objdb.h %{_includedir}/corosync/engine/quorum.h %{_libdir}/libcfg.so %{_libdir}/libcpg.so %{_libdir}/libconfdb.so %{_libdir}/libevs.so %{_libdir}/libtotem_pg.so %{_libdir}/liblogsys.so %{_libdir}/libcoroipcc.so %{_libdir}/libcoroipcs.so %{_libdir}/libquorum.so %{_libdir}/libvotequorum.so %{_libdir}/libpload.so %{_libdir}/libsam.so %{_libdir}/pkgconfig/*.pc %{_mandir}/man3/cpg_*3* %{_mandir}/man3/evs_*3* %{_mandir}/man3/confdb_*3* %{_mandir}/man3/votequorum_*3* %{_mandir}/man3/sam_*3* %{_mandir}/man8/cpg_overview.8* %{_mandir}/man8/evs_overview.8* %{_mandir}/man8/confdb_overview.8* %{_mandir}/man8/logsys_overview.8* %{_mandir}/man8/votequorum_overview.8* %{_mandir}/man8/coroipc_overview.8* %{_mandir}/man8/sam_overview.8* %changelog