Lines 1-64
Link Here
|
1 |
# Copyright 1999-2010 Gentoo Foundation |
1 |
# Copyright 1999-2009 Gentoo Foundation |
2 |
# Distributed under the terms of the GNU General Public License v2 |
2 |
# Distributed under the terms of the GNU General Public License v2 |
3 |
# $Header: /var/cvsroot/gentoo-x86/sys-fs/zfs-fuse/zfs-fuse-0.6.9-r1.ebuild,v 1.4 2010/08/10 10:31:00 ssuominen Exp $ |
3 |
# $Header: /var/cvsroot/gentoo-x86/app-accessibility/speakup/speakup-9999.ebuild,v 1.3 2009/12/03 20:43:20 williamh Exp $ |
4 |
|
4 |
|
5 |
EAPI=2 |
5 |
IUSE="bash-completion doc debug" |
6 |
inherit bash-completion |
|
|
7 |
|
6 |
|
8 |
DESCRIPTION="An implementation of the ZFS filesystem for FUSE/Linux" |
7 |
DESCRIPTION="An implementation of the ZFS filesystem for FUSE/Linux" |
9 |
HOMEPAGE="http://zfs-fuse.net/" |
8 |
HOMEPAGE="http://zfs-fuse.net" |
10 |
SRC_URI="http://zfs-fuse.net/releases/${PV}/source-tar-ball -> ${P}.tar.bz2" |
9 |
|
|
|
10 |
EAPI="2" |
11 |
EGIT_REPO_URI="http://rainemu.swishparty.co.uk/git/zfs" |
12 |
EGIT_BRANCH="compress" |
13 |
|
14 |
inherit git linux-mod autotools bash-completion |
15 |
|
16 |
SRC_URI="" |
11 |
|
17 |
|
12 |
LICENSE="CDDL" |
18 |
LICENSE="CDDL" |
13 |
SLOT="0" |
19 |
SLOT="0" |
14 |
KEYWORDS="~amd64 ~x86" |
20 |
KEYWORDS="~x86 ~amd64" |
15 |
IUSE="debug" |
21 |
|
|
|
22 |
DEPEND=">=sys-libs/glibc-2.3.3 |
23 |
>=dev-util/scons-0.96.1 |
24 |
>=dev-libs/libaio-0.3 |
25 |
>=dev-libs/lzo-2.0.4 |
26 |
>=sys-fs/fuse-2.6.1" |
16 |
|
27 |
|
17 |
RDEPEND="dev-libs/libaio |
28 |
RDEPEND=">=sys-fs/fuse-2.6.1" |
18 |
dev-libs/openssl |
|
|
19 |
sys-fs/fuse |
20 |
sys-libs/zlib" |
21 |
DEPEND="${RDEPEND} |
22 |
dev-util/scons |
23 |
sys-apps/acl |
24 |
sys-apps/attr" |
25 |
|
29 |
|
26 |
S=${WORKDIR}/${P}/src |
30 |
S="${WORKDIR}/${P}/src" |
27 |
|
31 |
|
28 |
src_prepare() { |
32 |
src_prepare() { |
29 |
sed -i \ |
33 |
|
30 |
-e '/LINKFLAGS/s:-s::' \ |
34 |
cd "${S}"/src |
31 |
-e '/CCFLAGS/s:-s -O2::' \ |
35 |
git checkout compress |
32 |
SConstruct || die |
36 |
|
33 |
|
37 |
sed -i -e '/LINKFLAGS/s:-s::' -e '/CCFLAGS/s:-s -O2::' ${S}/src/SConstruct || die "failed to sed" |
34 |
sed -i \ |
38 |
sed -i -e 's:../zdb/zdb:/usr/sbin/zdb:' cmd/ztest/ztest.c || die "sed failed" |
35 |
-e 's:../zdb/zdb:/usr/sbin/zdb:' \ |
39 |
epatch "${FILESDIR}"/${PV}/${PV}_cc_cflags_ldflags.patch |
36 |
cmd/ztest/ztest.c || die |
40 |
|
|
|
41 |
cd "${S}"/src/lib/libumem |
42 |
eautoreconf |
37 |
} |
43 |
} |
38 |
|
44 |
|
39 |
src_compile() { |
45 |
src_compile() { |
40 |
local _debug=0 |
46 |
cd "${S}"/src |
41 |
use debug && _debug=2 |
47 |
scons || die "Make failed" |
42 |
|
|
|
43 |
scons debug=${_debug} || die |
44 |
} |
48 |
} |
45 |
|
49 |
|
46 |
src_install() { |
50 |
src_install() { |
47 |
scons \ |
51 |
cd "${S}" |
48 |
install_dir="${D}/usr/sbin" \ |
52 |
cd src |
49 |
man_dir="${D}/usr/share/man/man8" \ |
53 |
if useq debug; then |
50 |
cfg_dir="${D}/etc/zfs" \ |
54 |
mv cmd/ztest/ztest cmd/ztest/run-ztest || die |
51 |
install || die |
55 |
mv cmd/ztest/runtest.sh cmd/ztest/ztest || die |
52 |
|
56 |
dosbin cmd/ztest/run-ztest || die |
53 |
insinto /etc/zfs |
57 |
fi |
54 |
doins ../contrib/zfsrc || die |
58 |
dosbin cmd/ztest/ztest || die |
55 |
|
59 |
|
56 |
keepdir /var/{lock,run}/zfs |
60 |
if useq debug; then |
57 |
fowners root.disk /var/{lock,run}/zfs |
61 |
mv zfs-fuse/zfs-fuse zfs-fuse/run-zfs-fuse || die |
58 |
|
62 |
mv zfs-fuse/run.sh zfs-fuse/zfs-fuse || die |
59 |
doinitd "${FILESDIR}"/${PN} |
63 |
dobin zfs-fuse/run-zfs-fuse || die |
60 |
|
64 |
fi |
61 |
dodoc ../{BUGS,CHANGES,HACKING,README*,STATUS,TESTING,TODO} |
65 |
dosbin "zfs-fuse/zfs-fuse" || die |
|
|
66 |
|
67 |
dosbin "cmd/zfs/zfs" || die |
68 |
dosbin "cmd/zpool/zpool" || die |
69 |
dosbin "cmd/zdb/zdb" || die |
70 |
|
71 |
newinitd "${FILESDIR}/${PV}/${PN}.rc" "zfs-fuse" || die |
72 |
|
73 |
keepdir /var/lock/zfs || die |
74 |
fowners daemon.disk /var/lock/zfs || die |
75 |
|
76 |
keepdir /var/run/zfs || die |
77 |
fowners daemon.disk /var/run/zfs || die |
78 |
|
79 |
cd "${WORKDIR}/${P}/src" || die |
80 |
|
81 |
dodoc CHANGES || die |
82 |
|
83 |
if use doc; then |
84 |
dodoc {INSTALL,TODO,STATUS,TESTING,HACKING,BUGS} || die |
85 |
fi |
86 |
|
87 |
if use bash-completion; then |
88 |
dobashcompletion ./contrib/zfs_completion.bash ${PN} || die |
89 |
fi |
90 |
} |
62 |
|
91 |
|
63 |
dobashcompletion ../contrib/zfs_completion.bash ${PN} |
92 |
pkg_postinst() { |
|
|
93 |
echo |
94 |
einfo "To debug and play with ZFS-FUSE make sure you have a recent 2.6.xx" |
95 |
einfo "series kernel with the FUSE module compiled in OR built as a" |
96 |
einfo "kernel module." |
97 |
einfo |
98 |
einfo "You can start the ZFS-FUSE daemon by running" |
99 |
einfo |
100 |
einfo " /etc/init.d/zfs-fuse start" |
101 |
einfo |
102 |
einfo "as root from the command line. " |
103 |
einfo |
104 |
einfo "And don't forget to add it permanently, if you want to:" |
105 |
einfo |
106 |
einfo " rc-update add zfs-fuse boot" |
107 |
einfo |
108 |
einfo "For additional ZFS related commands I recommend the ZFS admin" |
109 |
einfo "guide. http://opensolaris.org/os/community/zfs/docs/zfsadmin.pdf" |
110 |
einfo |
111 |
einfo "Don't forget this is an beta-quality release. Testing has been" |
112 |
einfo "very limited so please make sure you backup any important data." |
113 |
einfo |
114 |
einfo "If you have any problems with zfs-fuse please visit the ZFS-FUSE." |
115 |
einfo "website at http://zfs-fuse.net/" |
116 |
einfo "website at http://developer.berlios.de/projects/zfs-fuse/" |
117 |
echo |
64 |
} |
118 |
} |