1 |
commit: 04e8a1d42159c3fd387dadf77f8fd8af48831a5a |
2 |
Author: Sebastian Pipping <sebastian <AT> pipping <DOT> org> |
3 |
AuthorDate: Sat Jan 28 19:39:07 2012 +0000 |
4 |
Commit: Sebastian Pipping <sping <AT> gentoo <DOT> org> |
5 |
CommitDate: Sat Jan 28 19:46:30 2012 +0000 |
6 |
URL: http://git.overlays.gentoo.org/gitweb/?p=proj/betagarden.git;a=commit;h=04e8a1d4 |
7 |
|
8 |
sys-fs/zfs-fuse: 0.7.0 |
9 |
|
10 |
--- |
11 |
sys-fs/zfs-fuse/files/zfs-fuse | 46 +++++++++++++++ |
12 |
sys-fs/zfs-fuse/files/zfs-fuse-0.7.0-flags.patch | 14 +++++ |
13 |
sys-fs/zfs-fuse/zfs-fuse-0.7.0.ebuild | 66 ++++++++++++++++++++++ |
14 |
3 files changed, 126 insertions(+), 0 deletions(-) |
15 |
|
16 |
diff --git a/sys-fs/zfs-fuse/files/zfs-fuse b/sys-fs/zfs-fuse/files/zfs-fuse |
17 |
new file mode 100644 |
18 |
index 0000000..720ff91 |
19 |
--- /dev/null |
20 |
+++ b/sys-fs/zfs-fuse/files/zfs-fuse |
21 |
@@ -0,0 +1,46 @@ |
22 |
+#!/sbin/runscript |
23 |
+# Copyright 1999-2010 Gentoo Foundation |
24 |
+# Distributed under the terms of the GNU General Public License v2 |
25 |
+# $Header: /var/cvsroot/gentoo-x86/sys-fs/zfs-fuse/files/zfs-fuse,v 1.1 2010/06/22 20:13:43 ssuominen Exp $ |
26 |
+ |
27 |
+depend() { |
28 |
+ before net |
29 |
+ need fuse |
30 |
+} |
31 |
+ |
32 |
+PIDFILE="/var/run/zfs/zfs-fuse.pid" |
33 |
+EXEFILE="/usr/sbin/zfs-fuse" |
34 |
+ |
35 |
+checksystem() { |
36 |
+ return 0 # TODO |
37 |
+} |
38 |
+ |
39 |
+start() { |
40 |
+ ebegin "Starting ZFS-FUSE" |
41 |
+ checksystem || return 1 |
42 |
+ start-stop-daemon --start --exec ${EXEFILE} \ |
43 |
+ --user root --group disk -- --pidfile ${PIDFILE} |
44 |
+ rv=$? |
45 |
+ eend $rv |
46 |
+ |
47 |
+ if [[ $rv -eq 0 ]]; then |
48 |
+ ebegin "Mounting ZFS filesystems" |
49 |
+ zfs mount -a |
50 |
+ eend $? |
51 |
+ fi |
52 |
+} |
53 |
+ |
54 |
+stop() { |
55 |
+ ebegin "Unmounting ZFS filesystems" |
56 |
+ sync |
57 |
+ sleep 1 |
58 |
+ zfs umount -f -a |
59 |
+ eend $? |
60 |
+ sync |
61 |
+ |
62 |
+ ebegin "Stopping ZFS-FUSE" |
63 |
+ checksystem || return 2 |
64 |
+ start-stop-daemon --stop --pidfile ${PIDFILE} \ |
65 |
+ --exec ${EXEFILE} --retry TERM/1/TERM/2/TERM/4/TERM/8/KILL |
66 |
+ eend $? |
67 |
+} |
68 |
|
69 |
diff --git a/sys-fs/zfs-fuse/files/zfs-fuse-0.7.0-flags.patch b/sys-fs/zfs-fuse/files/zfs-fuse-0.7.0-flags.patch |
70 |
new file mode 100644 |
71 |
index 0000000..660816d |
72 |
--- /dev/null |
73 |
+++ b/sys-fs/zfs-fuse/files/zfs-fuse-0.7.0-flags.patch |
74 |
@@ -0,0 +1,14 @@ |
75 |
+--- src/SConstruct 2012-01-28 20:33:17.465511337 +0100 |
76 |
++++ src/SConstruct 2012-01-28 20:34:52.736320291 +0100 |
77 |
+@@ -30,9 +30,8 @@ |
78 |
+ f.close() |
79 |
+ |
80 |
+ env.CacheDir('/tmp/.zfs-fuse.scons') |
81 |
+-env['CC'] = 'gcc' |
82 |
+-env['LINKFLAGS'] = Split('-pipe -Wall') |
83 |
+-env['CCFLAGS'] = Split('-pipe -Wall -std=c99 -Wno-switch -Wno-unused -Wno-missing-braces -Wno-parentheses -Wno-uninitialized -fno-strict-aliasing -D_GNU_SOURCE -D_FILE_OFFSET_BITS=64 -D_REENTRANT -DTEXT_DOMAIN=\\"zfs-fuse\\" ') |
84 |
++env['LINKFLAGS'] = Split(os.environ.get('LDFLAGS', '')) |
85 |
++env['CCFLAGS'] = Split(os.environ.get('CFLAGS', '') + ' -Wall -std=c99 -Wno-switch -Wno-unused -Wno-missing-braces -Wno-parentheses -Wno-uninitialized -fno-strict-aliasing -D_GNU_SOURCE -D_FILE_OFFSET_BITS=64 -D_REENTRANT -DTEXT_DOMAIN=\\"zfs-fuse\\" ') |
86 |
+ |
87 |
+ if osname == "Linux": |
88 |
+ env.Append(CPPFLAGS = " -DLINUX_AIO") |
89 |
|
90 |
diff --git a/sys-fs/zfs-fuse/zfs-fuse-0.7.0.ebuild b/sys-fs/zfs-fuse/zfs-fuse-0.7.0.ebuild |
91 |
new file mode 100644 |
92 |
index 0000000..b0e5a7f |
93 |
--- /dev/null |
94 |
+++ b/sys-fs/zfs-fuse/zfs-fuse-0.7.0.ebuild |
95 |
@@ -0,0 +1,66 @@ |
96 |
+# Copyright 1999-2010 Gentoo Foundation |
97 |
+# Distributed under the terms of the GNU General Public License v2 |
98 |
+# $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 $ |
99 |
+ |
100 |
+EAPI=2 |
101 |
+inherit eutils bash-completion scons-utils |
102 |
+ |
103 |
+DESCRIPTION="An implementation of the ZFS filesystem for FUSE/Linux" |
104 |
+HOMEPAGE="http://zfs-fuse.net/" |
105 |
+SRC_URI="http://zfs-fuse.net/releases/${PV}/${P}.tar.bz2" |
106 |
+ |
107 |
+LICENSE="CDDL" |
108 |
+SLOT="0" |
109 |
+KEYWORDS="" # sys-fs/zfs-fuse-0.6.9-r1 masked for removal in main tree |
110 |
+IUSE="debug" |
111 |
+ |
112 |
+RDEPEND="dev-libs/libaio |
113 |
+ dev-libs/openssl |
114 |
+ sys-fs/fuse |
115 |
+ sys-libs/zlib" |
116 |
+DEPEND="${RDEPEND} |
117 |
+ dev-util/scons |
118 |
+ sys-apps/acl |
119 |
+ sys-apps/attr" |
120 |
+ |
121 |
+S=${WORKDIR}/${P}/src |
122 |
+ |
123 |
+src_prepare() { |
124 |
+ sed -i \ |
125 |
+ -e '/LINKFLAGS/s:-s::' \ |
126 |
+ -e '/CCFLAGS/s:-s -O2::' \ |
127 |
+ SConstruct || die |
128 |
+ |
129 |
+ sed -i \ |
130 |
+ -e 's:../zdb/zdb:/usr/sbin/zdb:' \ |
131 |
+ cmd/ztest/ztest.c || die |
132 |
+ |
133 |
+ epatch "${FILESDIR}"/${P}-flags.patch |
134 |
+} |
135 |
+ |
136 |
+src_compile() { |
137 |
+ local _debug=0 |
138 |
+ use debug && _debug=2 |
139 |
+ |
140 |
+ escons debug=${_debug} || die |
141 |
+} |
142 |
+ |
143 |
+src_install() { |
144 |
+ scons \ |
145 |
+ install_dir="${D}/usr/sbin" \ |
146 |
+ man_dir="${D}/usr/share/man/man8" \ |
147 |
+ cfg_dir="${D}/etc/zfs" \ |
148 |
+ install || die |
149 |
+ |
150 |
+ insinto /etc/zfs |
151 |
+ doins ../contrib/zfsrc || die |
152 |
+ |
153 |
+ keepdir /var/{lock,run}/zfs |
154 |
+ fowners root.disk /var/{lock,run}/zfs |
155 |
+ |
156 |
+ doinitd "${FILESDIR}"/${PN} |
157 |
+ |
158 |
+ dodoc ../{BUGS,CHANGES,HACKING,README*,STATUS,TESTING,TODO} |
159 |
+ |
160 |
+ dobashcompletion ../contrib/zfs_completion.bash ${PN} |
161 |
+} |