/[gentoo-x86]/sys-fs/btrfs-progs/btrfs-progs-0.19-r2.ebuild
Gentoo

Contents of /sys-fs/btrfs-progs/btrfs-progs-0.19-r2.ebuild

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.2 - (show annotations) (download)
Mon Apr 9 02:20:07 2012 UTC (2 years, 3 months ago) by lavajoe
Branch: MAIN
CVS Tags: HEAD
Changes since 1.1: +1 -1 lines
FILE REMOVED
Rewrite live ebuild to take advantage of improved upstream Makefiles (bug #411209) and fix bug #410765 - thanks go to floppym@gentoo.org for new ebuild

(Portage version: 2.1.10.47/cvs/Linux x86_64)

1 # Copyright 1999-2010 Gentoo Foundation
2 # Distributed under the terms of the GNU General Public License v2
3 # $Header: /var/cvsroot/gentoo-x86/sys-fs/btrfs-progs/btrfs-progs-0.19-r2.ebuild,v 1.1 2010/11/07 22:49:51 lavajoe Exp $
4
5 inherit eutils
6
7 DESCRIPTION="Btrfs filesystem utilities"
8 HOMEPAGE="http://btrfs.wiki.kernel.org/"
9 SRC_URI="http://www.kernel.org/pub/linux/kernel/people/mason/btrfs/${P}.tar.bz2
10 mirror://gentoo/${P}-redhat.patch.bz2"
11
12 LICENSE="GPL-2"
13 SLOT="0"
14 KEYWORDS="~amd64 ~arm ~ppc64 ~x86"
15 IUSE="acl debug-utils"
16
17 DEPEND="debug-utils? ( dev-python/matplotlib )
18 acl? (
19 sys-apps/acl
20 sys-fs/e2fsprogs
21 )"
22 RDEPEND="${DEPEND}"
23
24 src_unpack() {
25 unpack ${A}
26 cd "${S}"
27
28 # Apply patch from Josef Bacik (btrfs developer at RedHat)
29 # that brings version 0.19 up to the version used in RedHat/Fedora.
30 # Includes the previous convert-remove-used-space-update patch.
31 # Also includes the "-D" option in btrfsctl (bug #331121).
32 epatch "${WORKDIR}"/${P}-redhat.patch
33
34 epatch "${FILESDIR}"/${P}-glibc212.patch
35
36 # Fix hardcoded "gcc" and "make"
37 sed -i -e 's:gcc $(CFLAGS):$(CC) $(CFLAGS):' Makefile
38 sed -i -e 's:make:$(MAKE):' Makefile
39 }
40
41 src_compile() {
42 emake CC="$(tc-getCC)" CFLAGS="${CFLAGS}" LDFLAGS="${LDFLAGS}" \
43 all || die
44 emake CC="$(tc-getCC)" CFLAGS="${CFLAGS}" LDFLAGS="${LDFLAGS}" \
45 btrfstune btrfs-image || die
46 if use acl; then
47 emake CC="$(tc-getCC)" CFLAGS="${CFLAGS}" LDFLAGS="${LDFLAGS}" \
48 convert || die
49 fi
50 }
51
52 src_install() {
53 into /
54 dosbin btrfs
55 dosbin btrfs-show
56 dosbin btrfs-vol
57 dosbin btrfsctl
58 dosbin btrfsck
59 dosbin btrfstune
60 dosbin btrfs-image
61 # fsck will segfault if invoked at boot, so do not make this link
62 #dosym btrfsck /sbin/fsck.btrfs
63 newsbin mkfs.btrfs mkbtrfs
64 dosym mkbtrfs /sbin/mkfs.btrfs
65 if use acl; then
66 dosbin btrfs-convert
67 else
68 ewarn "Note: btrfs-convert not built/installed (requires acl USE flag)"
69 fi
70
71 if use debug-utils; then
72 dobin btrfs-debug-tree
73 else
74 ewarn "Note: btrfs-debug-tree not installed (requires debug-utils USE flag)"
75 fi
76
77 into /usr
78 newbin bcp btrfs-bcp
79
80 if use debug-utils; then
81 newbin show-blocks btrfs-show-blocks
82 else
83 ewarn "Note: btrfs-show-blocks not installed (requires debug-utils USE flag)"
84 fi
85
86 dodoc INSTALL
87 emake prefix="${D}/usr/share" install-man
88 }
89
90 pkg_postinst() {
91 ewarn "WARNING: This version of btrfs-progs corresponds to and should only"
92 ewarn " be used with the version of btrfs included in the"
93 ewarn " Linux kernel (2.6.31 and above)."
94 ewarn ""
95 ewarn " This version should NOT be used with earlier versions"
96 ewarn " of the standalone btrfs module!"
97 }

  ViewVC Help
Powered by ViewVC 1.1.20