summaryrefslogtreecommitdiff
blob: 106c1fe2227186141fb60cf9869ed9ae377720ce (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
# Copyright 1999-2008 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Header: /var/cvsroot/gentoo-x86/sys-fs/mtd-utils/mtd-utils-20060907.ebuild,v 1.7 2008/02/23 21:05:51 vapier Exp $

inherit toolchain-funcs flag-o-matic

DESCRIPTION="MTD userspace tools, based on GIT snapshot from upstream"
HOMEPAGE="http://sources.redhat.com/jffs2/"
SRC_URI="mirror://gentoo/${PN}-snapshot-${PV}.tar.bz2"

LICENSE="GPL-2"
SLOT="0"
KEYWORDS="amd64 arm mips ppc x86"
IUSE=""

S=${WORKDIR}/${PN}

RDEPEND="!sys-fs/mtd
		sys-libs/zlib"
# ACL is only required for the <sys/acl.h> header file to build mkfs.jffs2
DEPEND="sys-apps/acl
		${DEPEND}"

src_unpack() {
	unpack ${A}
	sed -i.orig \
		-e 's!^MANDIR.*!MANDIR = /usr/share/man!g' \
		-e 's!-include.*!!g' \
		"${S}"/Makefile
}

src_compile() {
	append-flags -I./include -Wall
	emake DESTDIR="${D}" CFLAGS="${CFLAGS}" LDFLAGS="${LDFLAGS}" CC="$(tc-getCC)" || die
}

src_install() {
	emake install DESTDIR="${D}" || die
	dodoc *.txt
}