1 # Copyright 1999-2020 Gentoo Authors
2 # Distributed under the terms of the GNU General Public License v2
10 DESCRIPTION="OSI Certified implementation of a complete cluster engine"
11 HOMEPAGE="http://www.corosync.org/"
12 SRC_URI="http://build.clusterlabs.org/corosync/releases/${P}.tar.gz"
14 LICENSE="BSD-2 public-domain"
16 KEYWORDS="amd64 hppa ppc ppc64 x86"
17 IUSE="doc infiniband static-libs systemd xml"
19 # TODO: support those new configure flags
20 # --enable-augeas : Install the augeas lens for corosync.conf
21 # --enable-snmp : SNMP protocol support
22 # --enable-watchdog : Watchdog support
23 RDEPEND="!sys-cluster/heartbeat
25 sys-fabric/libibverbs:*
26 sys-fabric/librdmacm:*
29 >=sys-cluster/libqb-0.14.4"
32 doc? ( sys-apps/groff )"
34 PATCHES=( "${FILESDIR}/${PN}-2.3.4-docs.patch" )
36 DOCS=( README.recovery SECURITY AUTHORS )
38 S="${WORKDIR}/${PN}-${PN}-${MY_TREE}"
47 # appends lib to localstatedir automatically
48 # FIXME: install just shared libs --disable-static does not work
50 --localstatedir=/var \
51 $(use_enable infiniband rdma) \
52 $(use_enable systemd) \
53 $(use_enable xml xmlconf)
55 use doc && econf_opts+=( --enable-doc )
56 econf "${econf_opts[@]}"
61 newinitd "${FILESDIR}"/${PN}.initd ${PN}
64 rm "${D}"/lib/systemd/system/corosync-notifyd.service || die
66 rm "${D}"/etc/init.d/corosync-notifyd || die
69 insinto /etc/logrotate.d
70 newins "${FILESDIR}"/${PN}.logrotate ${PN}
72 keepdir /var/lib/corosync
73 use static-libs || rm -rf "${D}"/usr/$(get_libdir)/*.{,l}a || die
78 if [[ ${REPLACING_VERSIONS} < 2.0 ]]; then
79 ewarn "!! IMPORTANT !!"
81 ewarn "Migrating from a previous version of corosync can be dangerous !"
83 ewarn "Make sure you backup your cluster configuration before proceeding"