dev-qt/qttest: stable 5.14.2 for ppc, bug #719732
[gentoo.git] / sys-cluster / cluster-glue / cluster-glue-1.0.12-r1.ebuild
1 # Copyright 1999-2020 Gentoo Authors
2 # Distributed under the terms of the GNU General Public License v2
3
4 EAPI=6
5
6 MY_P="${P/cluster-}"
7 inherit autotools eutils flag-o-matic multilib user
8
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"
12
13 LICENSE="GPL-2"
14 SLOT="0"
15 KEYWORDS="~amd64 ~hppa ~x86"
16 IUSE="doc ipmilan libnet static-libs"
17
18 RDEPEND="
19         !<sys-cluster/heartbeat-3.0
20         app-arch/bzip2
21         app-text/asciidoc
22         app-text/docbook-xml-dtd:4.4
23         dev-libs/glib:2
24         dev-libs/libaio
25         dev-libs/libltdl:=
26         dev-libs/libxml2
27         ipmilan? ( sys-libs/openipmi )
28         libnet? ( net-libs/libnet:1.1 )
29         net-misc/curl
30         net-misc/iputils
31         || ( net-misc/netkit-telnetd net-misc/telnet-bsd )
32 "
33 DEPEND="${RDEPEND}
34         doc? (
35                 dev-libs/libxslt
36                 app-text/docbook-xsl-stylesheets
37                 )"
38
39 S="${WORKDIR}/Reusable-Cluster-Components-glue--${MY_P}"
40
41 pkg_setup() {
42         enewgroup haclient
43         enewuser  hacluster -1 /dev/null /var/lib/heartbeat haclient
44 }
45
46 src_prepare() {
47         default
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
51         eautoreconf
52 }
53
54 src_configure() {
55         append-cppflags -DOPENIPMI_DEFINE_SELECTOR_T
56         local myopts
57
58         use doc && myopts=" --enable-doc"
59         econf \
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 \
66                 ${myopts} \
67                 --with-group-id=$(id -g hacluster) \
68                 --with-ccmuser-id=$(id -u hacluster) \
69                 --with-daemon-user=hacluster --with-daemon-group=haclient
70 }
71
72 src_install() {
73         default
74
75         dodir /var/lib/heartbeat/cores
76         dodir /var/lib/heartbeat/lrm
77
78         keepdir /var/lib/heartbeat/cores
79         keepdir /var/lib/heartbeat/lrm
80
81         # init.d file
82         cp "${FILESDIR}"/heartbeat-logd.init "${T}/" || die
83         sed -i \
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
88
89         use static-libs || find "${D}" -type f -name "*.la" -delete
90 }
91
92 pkg_postinst() {
93         chown -R hacluster:haclient /var/lib/heartbeat/cores
94         chown -R hacluster:haclient /var/lib/heartbeat/lrm
95 }