1 # Copyright 1999-2020 Gentoo Authors
2 # Distributed under the terms of the GNU General Public License v2
7 inherit autotools eutils flag-o-matic multilib user
9 DESCRIPTION="Library pack for Heartbeat / Pacemaker"
10 HOMEPAGE="http://www.linux-ha.org/wiki/Cluster_Glue"
11 SRC_URI="http://hg.linux-ha.org/glue/archive/${MY_P}.tar.bz2"
15 KEYWORDS="~amd64 ~hppa ~x86"
16 IUSE="doc ipmilan libnet static-libs"
19 !<sys-cluster/heartbeat-3.0
22 app-text/docbook-xml-dtd:4.4
27 ipmilan? ( sys-libs/openipmi )
28 libnet? ( net-libs/libnet:1.1 )
31 || ( net-misc/netkit-telnetd net-misc/telnet-bsd )
36 app-text/docbook-xsl-stylesheets
39 S="${WORKDIR}/Reusable-Cluster-Components-glue--${MY_P}"
43 enewuser hacluster -1 /dev/null /var/lib/heartbeat haclient
48 sed -e '/ -ggdb/d;/-fstack-protector-all/d' -i configure.ac || die
49 sed -e "s@http://docbook.sourceforge.net/release/xsl/current@/usr/share/sgml/docbook/xsl-stylesheets/@g" \
50 -i doc/Makefile.am || die
55 append-cppflags -DOPENIPMI_DEFINE_SELECTOR_T
58 use doc && myopts=" --enable-doc"
60 $(use_enable ipmilan) \
61 $(use_enable libnet) \
62 $(use_enable static-libs static) \
63 --disable-fatal-warnings \
64 --localstatedir=/var \
65 --with-ocf-root=/usr/$(get_libdir)/ocf \
67 --with-group-id=$(id -g hacluster) \
68 --with-ccmuser-id=$(id -u hacluster) \
69 --with-daemon-user=hacluster --with-daemon-group=haclient
75 dodir /var/lib/heartbeat/cores
76 dodir /var/lib/heartbeat/lrm
78 keepdir /var/lib/heartbeat/cores
79 keepdir /var/lib/heartbeat/lrm
82 cp "${FILESDIR}"/heartbeat-logd.init "${T}/" || die
84 -e "s:%libdir%:$(get_libdir):" \
85 "${T}/heartbeat-logd.init" || die
86 # newinitd "${T}/heartbeat-logd.init" heartbeat-logd
87 rm "${D}"/etc/init.d/logd
89 use static-libs || find "${D}" -type f -name "*.la" -delete
93 chown -R hacluster:haclient /var/lib/heartbeat/cores
94 chown -R hacluster:haclient /var/lib/heartbeat/lrm