summaryrefslogtreecommitdiff
blob: f80ce8b274dfb2df824339801c996ba6c1c8f5a3 (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
63
# Copyright 1999-2009 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Header: /var/cvsroot/gentoo-x86/sys-fs/ocfs2-tools/Attic/ocfs2-tools-1.2.1.ebuild,v 1.5 2009/10/08 09:03:35 flameeyes dead $

EAPI="3"
PV_MAJOR="${PV%%.*}"
PV_MINOR="${PV#*.}"
PV_MINOR="${PV_MINOR%%.*}"
DESCRIPTION="Support programs for the Oracle Cluster Filesystem 2"
HOMEPAGE="http://oss.oracle.com/projects/ocfs2-tools/"
SRC_URI="http://oss.oracle.com/projects/ocfs2-tools/dist/files/source/v${PV_MAJOR}.${PV_MINOR}/${P}.tar.gz"

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

# (#142216) build system's broke, always requires glib for debugfs utility
RDEPEND="
	X? (
		x11-libs/gtk+:2
		>=dev-lang/python-2
		>=dev-python/pygtk-2
	)
	sys-apps/util-linux
	>=dev-libs/glib-2.2.3
	sys-fs/e2fsprogs"
DEPEND="${RDEPEND}"

src_configure() {
	econf \
		$(use_enable X ocfs2console) \
		--enable-dynamic-fsck \
		--enable-dynamic-ctl
}

src_install() {
	make DESTDIR="${D}" install || die "Failed to install"

	dodoc CREDITS MAINTAINERS README.O2CB debugfs.ocfs2/README \
		documentation/{{users_guide,ocfs2_faq}.txt,/samples/cluster.conf} \
		"${FILESDIR}"/INSTALL.GENTOO

	# Keep o2cb script in case someone needs it
	insinto /usr/sbin
	newins vendor/common/o2cb.init o2cb
	insinto /etc/default
	newins vendor/common/o2cb.sysconfig o2cb

	newinitd "${FILESDIR}"/ocfs2.init ocfs2
	newconfd "${FILESDIR}"/ocfs2.conf ocfs2

	insinto /etc/ocfs2
	newins documentation/samples/cluster.conf cluster.conf

#	keepdir /config
#	keepdir /dlm
}

pkg_postinst() {
	elog "Read INSTALL.GENTOO in /share/doc/${PF}/ for instructions"
	elog "about how to install, configure and run ocfs2."
}