summaryrefslogtreecommitdiff
blob: b28f73671f228db327b22e77c057f1adb60bbd6a (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
# Copyright 1999-2010 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Header: /var/cvsroot/gentoo-x86/sys-fs/zfs-fuse/zfs-fuse-0.6.9.ebuild,v 1.1 2010/06/05 23:46:32 ssuominen Exp $

EAPI=2

DESCRIPTION="An implementation of the ZFS filesystem for FUSE/Linux"
HOMEPAGE="http://zfs-fuse.net/"
SRC_URI="http://zfs-fuse.net/releases/${PV}/source-tar-ball -> ${P}.tar.bz2"

LICENSE="CDDL"
SLOT="0"
KEYWORDS="~amd64 ~x86"
IUSE="debug"

RDEPEND="sys-fs/fuse
	sys-libs/zlib
	dev-libs/libaio
	dev-libs/openssl"
DEPEND="${RDEPEND}
	dev-util/scons"

S=${WORKDIR}/${P}/src

src_prepare() {
	sed -i \
		-e '/LINKFLAGS/s:-s::' \
		-e '/CCFLAGS/s:-s -O2::' \
		SConstruct || die

	sed -i \
		-e 's:../zdb/zdb:/usr/sbin/zdb:' \
		cmd/ztest/ztest.c || die
}

src_compile() {
	local _debug=0
	use debug && _debug=2

	scons debug=${_debug} || die
}

src_install() {
	scons \
		install_dir="${D}/usr/sbin" \
		man_dir="${D}/usr/share/man/man8" \
		cfg_dir="${D}/etc/zfs" \
		install || die

	dodir /etc/zfs
	keepdir /var/{lock,run}/zfs
	fowners daemon.disk /var/{lock,run}/zfs
	newinitd "${FILESDIR}"/${PN}.rc ${PN}

	dodoc ../{BUGS,CHANGES,HACKING,README*,STATUS,TESTING,TODO}
}