summaryrefslogtreecommitdiff
path: root/sys-fs/ocfs2-tools/ocfs2-tools-1.8.7-r1.ebuild
blob: 1c20fcfd9584009cd28b18a8e2eef91c8182fabc (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
60
61
62
# Copyright 1999-2015 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Id$

EAPI="7"
inherit autotools

DESCRIPTION="Support programs for the Oracle Cluster Filesystem 2"
HOMEPAGE="http://oss.oracle.com/projects/ocfs2-tools/ https://github.com/markfasheh/ocfs2-tools"
SRC_URI="https://github.com/markfasheh/${PN}/archive/${P}.tar.gz"

LICENSE="GPL-2"
SLOT="0"
KEYWORDS="~amd64 ~x86"
IUSE="debug pacemaker"

RDEPEND="
	dev-libs/libaio
	sys-apps/util-linux
	pacemaker? (
		sys-cluster/dlm
		sys-cluster/pacemaker
		)
	sys-fs/e2fsprogs
	sys-libs/ncurses
	sys-libs/readline
	sys-process/psmisc
"
# 99% of deps this thing has is automagic
# specialy cluster things corosync/pacemaker
DEPEND="${RDEPEND}"
S="${WORKDIR}/${PN}-${P}"

DOCS=(
	"${S}/documentation/samples/cluster.conf"
	"${S}/documentation/users_guide.txt"
)

MAKEOPTS+=" -j1"

src_prepare() {
	default
	# gentoo uses /sys/kernel/dlm as dlmfs mountpoint
	sed -e 's:"/dlm/":"/sys/kernel/dlm":g' \
		-i libo2dlm/o2dlm_test.c \
		-i libocfs2/dlm.c || die "sed failed"
	AT_M4DIR=. eautoreconf
}

src_configure() {
	econf \
		$(use_enable debug debug) \
		$(use_enable debug debugexe) \
		--enable-dynamic-fsck \
		--enable-dynamic-ctl
}

src_install() {
	default
	newinitd "${FILESDIR}/ocfs2.initd" ocfs2
	newconfd "${FILESDIR}/ocfs2.confd" ocfs2
}