/[gentoo-x86]/sys-cluster/cman/cman-3.1.5-r1.ebuild
Gentoo

Contents of /sys-cluster/cman/cman-3.1.5-r1.ebuild

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.1 - (show annotations) (download)
Tue Dec 11 22:16:13 2012 UTC (5 years, 7 months ago) by robbat2
Branch: MAIN
CVS Tags: HEAD
Non-maintainer revbump with init.d sanity checks for configfs/dlm per stabilization bug #442512; also convert init.d to be POSIX-sh safe. Please note that configfs and DLM are required for cman.

(Portage version: 2.2.0_alpha144/cvs/Linux x86_64, unsigned Manifest commit)

1 # Copyright 1999-2012 Gentoo Foundation
2 # Distributed under the terms of the GNU General Public License v2
3 # $Header: /var/cvsroot/gentoo-x86/sys-cluster/cman/cman-3.1.5.ebuild,v 1.2 2011/10/18 20:54:50 jer Exp $
4
5 EAPI=4
6
7 inherit linux-info multilib toolchain-funcs versionator
8
9 CLUSTER_RELEASE="${PV}"
10 MY_P="cluster-${CLUSTER_RELEASE}"
11
12 MAJ_PV="$(get_major_version)"
13 MIN_PV="$(get_version_component_range 2-3)"
14
15 DESCRIPTION="Cluster Manager"
16 HOMEPAGE="https://fedorahosted.org/cluster/wiki/HomePage"
17 SRC_URI="https://fedorahosted.org/releases/c/l/cluster/${MY_P}.tar.gz"
18
19 LICENSE="GPL-2"
20 SLOT="0"
21 KEYWORDS="~amd64 ~hppa ~x86"
22 IUSE="dbus ldap"
23
24 RDEPEND="dev-libs/libxml2
25 dev-libs/libxslt
26 dbus? ( sys-apps/dbus )
27 ldap? ( net-nds/openldap )
28 sys-cluster/corosync
29 sys-cluster/openais
30 ~sys-cluster/libccs-${PV}
31 ~sys-cluster/libfence-${PV}
32 ~sys-cluster/libcman-${PV}
33 ~sys-cluster/libdlm-${PV}
34 ~sys-cluster/liblogthread-${PV}
35 !sys-cluster/dlm
36 "
37 DEPEND="${RDEPEND}
38 >=sys-kernel/linux-headers-2.6.24"
39
40 S="${WORKDIR}/${MY_P}"
41
42 # TODO:
43 # * Gentoo'ise the init script
44
45 src_configure() {
46 # cluster libs have their own separate packages
47 sed -i -e 's|lib||' "${S}/cman/Makefile" || die
48 sed -i -e 's|liblogthread||' "${S}/common/Makefile" || die
49 sed -i -e 's|libs||' "${S}/config/Makefile" || die
50 sed -i -e 's|libdlm libdlmcontrol||' "${S}/dlm/Makefile" || die
51 sed -i -e 's|libfence libfenced||' "${S}/fence/Makefile" || die
52 sed -i -e 's|fence/libfenced||' "${S}/Makefile" || die
53
54 sed -i \
55 -e 's|\(^all:.*\)depends |\1|' \
56 config/tools/ccs_tool/Makefile \
57 fence/fence{d,_node,_tool}/Makefile \
58 cman/{cman_tool,daemon,tests,qdisk,notifyd}/Makefile \
59 dlm/{tool,tests/usertest}/Makefile \
60 || die "sed failed"
61
62 if ! use ldap ; then
63 sed -i -e 's|ldap||' config/plugins/Makefile || die "sed failed"
64 fi
65 local myopts=""
66 use dbus || myopts="--disable_dbus"
67 ./configure \
68 --cc=$(tc-getCC) \
69 --cflags="-Wall" \
70 --libdir=/usr/$(get_libdir) \
71 --disable_kernel_check \
72 --kernel_src=${KERNEL_DIR} \
73 --somajor="$MAJ_PV" \
74 --sominor="$MIN_PV" \
75 --without_rgmanager \
76 --without_bindings \
77 ${myopts} \
78 || die "configure problem"
79 }
80
81 src_install() {
82 emake DESTDIR="${D}" install
83
84 # we have to create it in the init.d script anyway
85 rmdir "${D}"/var/run/{cluster,}
86
87 keepdir /var/{lib,log}/cluster
88 keepdir /etc/cluster/cman-notify.d
89
90 rm -rf "${D}/usr/share/doc"
91 dodoc \
92 doc/{usage.txt,cman_notify_template.sh} \
93 config/plugins/ldap/*.ldif
94 dohtml doc/*.html
95
96 # lib-specific man pages are provided by the corresponding packages
97 rm "${D}/usr/share/man/man3/libdlm.3"
98
99 newinitd "${FILESDIR}/${PN}.initd-3.1.5-r1" "${PN}"
100 newconfd "${FILESDIR}/${PN}.confd" "${PN}"
101 }

  ViewVC Help
Powered by ViewVC 1.1.20