| 1 |
# Copyright 1999-2009 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.16-r1.ebuild,v 1.5 2012/04/09 02:20:07 lavajoe Exp $
|
| 4 |
|
| 5 |
inherit eutils
|
| 6 |
|
| 7 |
DESCRIPTION="Btrfs filesystem utilities"
|
| 8 |
HOMEPAGE="http://btrfs.wiki.kernel.org/"
|
| 9 |
SRC_URI="mirror://gentoo/${P}.tar.bz2"
|
| 10 |
|
| 11 |
LICENSE="GPL-2"
|
| 12 |
SLOT="0"
|
| 13 |
KEYWORDS="~amd64 ~x86"
|
| 14 |
IUSE="acl"
|
| 15 |
|
| 16 |
DEPEND="acl? (
|
| 17 |
sys-apps/acl
|
| 18 |
sys-fs/e2fsprogs
|
| 19 |
)"
|
| 20 |
RDEPEND="${DEPEND}"
|
| 21 |
|
| 22 |
src_unpack() {
|
| 23 |
unpack ${A}
|
| 24 |
cd "${S}"
|
| 25 |
|
| 26 |
# Apply hot fixes
|
| 27 |
#epatch "${FILESDIR}/${P}-hotfix.patch"
|
| 28 |
|
| 29 |
# Fix hardcoded "gcc" and "make"
|
| 30 |
sed -i -e 's:gcc $(CFLAGS):$(CC) $(CFLAGS):' Makefile
|
| 31 |
sed -i -e 's:make:$(MAKE):' Makefile
|
| 32 |
}
|
| 33 |
|
| 34 |
src_compile() {
|
| 35 |
emake CC="$(tc-getCC)" CFLAGS="${CFLAGS}" LDFLAGS="${LDFLAGS}" \
|
| 36 |
all || die
|
| 37 |
if use acl; then
|
| 38 |
emake CC="$(tc-getCC)" CFLAGS="${CFLAGS}" LDFLAGS="${LDFLAGS}" \
|
| 39 |
convert || die
|
| 40 |
fi
|
| 41 |
}
|
| 42 |
|
| 43 |
src_install() {
|
| 44 |
into /
|
| 45 |
dosbin btrfs-show
|
| 46 |
dosbin btrfs-vol
|
| 47 |
dosbin btrfsctl
|
| 48 |
dosbin btrfsck
|
| 49 |
# fsck will segfault if invoked at boot, so do not make this link
|
| 50 |
#dosym btrfsck /sbin/fsck.btrfs
|
| 51 |
newsbin debug-tree btrfs-debug-tree
|
| 52 |
newsbin mkfs.btrfs mkbtrfs
|
| 53 |
dosym mkbtrfs /sbin/mkfs.btrfs
|
| 54 |
if use acl; then
|
| 55 |
dosbin btrfs-convert
|
| 56 |
else
|
| 57 |
ewarn "Note: btrfs-convert not built/installed (requires acl USE flag)"
|
| 58 |
fi
|
| 59 |
|
| 60 |
into /usr
|
| 61 |
newbin bcp btrfs-bcp
|
| 62 |
newbin show-blocks btrfs-show-blocks
|
| 63 |
|
| 64 |
dodoc INSTALL
|
| 65 |
}
|
| 66 |
|
| 67 |
pkg_postinst() {
|
| 68 |
ewarn "WARNING: This version should only be used with the matching version"
|
| 69 |
ewarn " of the standalone btrfs kernel module!"
|
| 70 |
}
|