sys-fs/simple-mtpfs: new version 0.3.0.
[gentoo.git] / sys-fs / mtd-utils / mtd-utils-1.5.2.ebuild
1 # Copyright 1999-2017 Gentoo Foundation
2 # Distributed under the terms of the GNU General Public License v2
3
4 EAPI="5"
5
6 inherit eutils vcs-snapshot
7
8 if [[ ${PV} == "99999999" ]] ; then
9         EGIT_REPO_URI="git://git.infradead.org/mtd-utils.git"
10
11         inherit git-2
12         SRC_URI=""
13         #KEYWORDS=""
14 else
15         if [[ ${PV} == *.*.* ]] ; then
16                 MY_PV="${PV}-*"
17                 SRC_URI="http://git.infradead.org/mtd-utils.git/snapshot/v${PV}.tar.gz -> ${P}.tar.gz"
18         else
19                 MY_PV="${PV}-02ae0aac87576d07202a62d11294ea55b56f450b"
20                 SRC_URI="mirror://gentoo/${PN}-snapshot-${MY_PV}.tar.xz"
21         fi
22         KEYWORDS="amd64 arm ~mips ppc x86 ~amd64-linux ~arm-linux ~x86-linux"
23 fi
24
25 DESCRIPTION="MTD userspace tools (NFTL, JFFS2, NAND, FTL, UBI)"
26 HOMEPAGE="http://git.infradead.org/?p=mtd-utils.git;a=summary"
27
28 LICENSE="GPL-2"
29 SLOT="0"
30 IUSE="xattr"
31
32 # We need libuuid
33 RDEPEND="!sys-fs/mtd
34         dev-libs/lzo
35         sys-libs/zlib
36         >=sys-apps/util-linux-2.16"
37 # ACL is only required for the <sys/acl.h> header file to build mkfs.jffs2
38 # And ACL brings in Attr as well.
39 DEPEND="${RDEPEND}
40         xattr? ( sys-apps/acl )"
41
42 src_prepare() {
43         epatch "${FILESDIR}"/${P}-sysmacros.patch #580206
44 }
45
46 makeopts() {
47         # These affect build output, so keep it common between compile & install.
48         echo CROSS=${CHOST}- V=1
49         use xattr || echo WITHOUT_XATTR=1
50 }
51
52 src_compile() {
53         tc-export AR CC RANLIB
54         local compileopts=(
55                 AR="${AR}" CC="${CC}" RANLIB="${RANLIB}"
56         )
57         emake $(makeopts) "${compileopts[@]}"
58 }
59
60 src_install() {
61         emake $(makeopts) install DESTDIR="${ED}"
62         dodoc *.txt
63         newdoc mkfs.ubifs/README README.mkfs.ubifs
64         # TODO: check ubi-utils for docs+scripts
65 }