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
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
|
# Copyright 1999-2009 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Header: /var/cvsroot/gentoo-x86/sys-cluster/openais/openais-0.80.3-r1.ebuild,v 1.2 2009/02/10 22:39:32 xmerlin Exp $
inherit eutils flag-o-matic toolchain-funcs
IUSE="debug"
DESCRIPTION="Open Application Interface Specification cluster framework"
HOMEPAGE="http://www.openais.org/"
#SRC_URI="ftp://ftp%40openais%2Eorg:downloads@openais.org/downloads/${P}/${P}.tar.gz"
SRC_URI="http://devresources.linux-foundation.org/dev/openais/downloads/${P}/${P}.tar.gz"
LICENSE="BSD public-domain"
SLOT="0"
KEYWORDS="amd64 x86"
DEPEND="virtual/libc"
src_unpack() {
unpack ${A}
cd "${S}"
epatch "${FILESDIR}"/${P}-Makefile-ARCH.patch || die
epatch "${FILESDIR}"/${P}-Makefile-LIBDIR.patch || die
epatch "${FILESDIR}"/${P}-Makefile.inc-FLAGS.patch || die
epatch "${FILESDIR}"/${P}-Makefile.inc-VARS.patch || die
epatch "${FILESDIR}"/${P}-Makefile-VARS.patch || die
#epatch "${FILESDIR}"/${P}-r1514.patch || die
epatch "${FILESDIR}"/${P}-r1661.patch || die
#epatch "${FILESDIR}"/${P}-r1661-pacemaker-openais.conf.patch || die
#epatch "${FILESDIR}"/${P}-r1661-pacemaker.patch || die
#epatch "${FILESDIR}"/pacemaker.diff || die
}
pkg_setup() {
enewgroup ais
enewuser ais -1 -1 -1 ais
}
src_compile() {
useq debug && append-flags -O0 -ggdb -Wall -DDEBUG
emake -j1 LIBDIR="/usr/$(get_libdir)/openais" \
CFLAGS="${CFLAGS}" CC="$(tc-getCC)"
}
src_install() {
emake LIBDIR="/usr/$(get_libdir)/openais" \
DESTDIR="${D}" install || die "make install failed"
insinto /etc/ais
doins "${FILESDIR}"/openais.conf
# http://bugs.gentoo.org/show_bug.cgi?id=160847#c16
dosym /usr/sbin/aisexec /sbin/aisexec
dodir /etc/env.d
echo LDPATH="/usr/$(get_libdir)/openais" > "${D}"/etc/env.d/03openais
newinitd "${FILESDIR}"/ais.initd ais
diropts -o ais -g ais -m 0750
keepdir /var/log/ais
exeinto /usr/libexec/openais
doexe exec/openais-instantiate || die
doexe test/{ckptbench,ckptbenchth,ckpt-rd,ckptstress,ckpt-wr,clc_cli_script} || die
doexe test/{cpgbench,evsbench,evtbench} || die
doexe test/{publish,subscription,testamf1,testckpt,testclm,testclm2,testcpg,testcpg2} || die
doexe test/{testevs,testevt,testlck,testmsg,unlink} || die
dosbin test/openais-cfgtool || die
dodoc CHANGELOG QUICKSTART README.* SECURITY TODO conf/*
}
|