mtd-utils-1.5.2.ebuild 1.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566
  1. # Copyright 1999-2017 Gentoo Foundation
  2. # Distributed under the terms of the GNU General Public License v2
  3. EAPI="5"
  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. src_prepare() {
  35. epatch "${FILESDIR}"/${P}-sysmacros.patch #580206
  36. }
  37. makeopts() {
  38. # These affect build output, so keep it common between compile & install.
  39. echo CROSS=${CHOST}- V=1
  40. use xattr || echo WITHOUT_XATTR=1
  41. }
  42. src_compile() {
  43. tc-export AR CC RANLIB
  44. local compileopts=(
  45. AR="${AR}" CC="${CC}" RANLIB="${RANLIB}"
  46. )
  47. emake $(makeopts) "${compileopts[@]}"
  48. }
  49. src_install() {
  50. emake $(makeopts) install DESTDIR="${ED}"
  51. dodoc *.txt
  52. newdoc mkfs.ubifs/README README.mkfs.ubifs
  53. # TODO: check ubi-utils for docs+scripts
  54. }