mtd-utils-1.5.1.ebuild 1.5 KB

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