summaryrefslogtreecommitdiff
blob: 473b4f267f3bad6ae1ada2c70f10478b1a432e77 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
# Copyright 1999-2005 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Header: /var/cvsroot/gentoo-x86/sys-cluster/keepalived/keepalived-1.1.5.ebuild,v 1.7 2005/02/21 09:15:49 spyderous Exp $

DESCRIPTION="The main goal of the keepalived project is to add a strong & robust keepalive facility to the Linux Virtual Server project."
HOMEPAGE="http://www.keepalived.org"
LICENSE="GPL-2"

DEPEND="dev-libs/popt
	sys-apps/iproute2"

SRC_URI="http://www.keepalived.org/software/${P}.tar.gz"

IUSE="debug"
SLOT="0"
KEYWORDS="x86 ~sparc ~amd64 ppc"

src_compile() {
	local myconf

	myconf="--prefix=/"

	use debug && myconf="${myconf} --enable-debug"
#	use profile && myconf="${myconf} --enable-profile"

	cd "${S}"
	./configure ${myconf} || die "configure failed"
	emake || die "make failed (myconf=${myconf})"

}

src_install() {

	cd "${S}"
	einstall || die

	exeinto /etc/init.d
	newexe ${FILESDIR}/init-keepalived keepalived

	dodoc doc/* doc/samples/*


}

pkg_postinst() {

	einfo ""
	einfo "If you want Linux Virtual Server support in"
	einfo "keepalived then you must emerge an LVS patched"
	einfo "kernel like gentoo-sources, compile with ipvs"
	einfo "support either as a module or built into the"
	einfo "kernel, emerge the ipvsadm userland tools,"
	einfo "and reemerge keepalived."
	einfo ""
	einfo "For debug support add USE=\"debug\""
	einfo "to your /etc/make.conf"
	einfo ""

}