nvme-cli-0.9.ebuild 754 B

12345678910111213141516171819202122232425262728293031323334353637
  1. # Copyright 1999-2016 Gentoo Foundation
  2. # Distributed under the terms of the GNU General Public License v2
  3. EAPI=6
  4. inherit toolchain-funcs
  5. DESCRIPTION="NVM-Express user space tooling for Linux"
  6. HOMEPAGE="https://github.com/linux-nvme/nvme-cli"
  7. SRC_URI="https://github.com/linux-nvme/nvme-cli/archive/v${PV}.tar.gz -> ${P}.tar.gz"
  8. LICENSE="GPL-2"
  9. SLOT="0"
  10. KEYWORDS="~amd64 ~x86"
  11. IUSE="udev"
  12. RDEPEND="sys-libs/libcap
  13. udev? ( virtual/libudev:= )"
  14. DEPEND="${RDEPEND}"
  15. src_prepare() {
  16. sed -i -E \
  17. -e '/^CFLAGS/s: (-O2|-g|-Wall|-Werror)\>: :g' \
  18. Makefile || die
  19. sed -i \
  20. -e '/^PREFIX/s|:=|?=|' \
  21. Documentation/Makefile || die
  22. default
  23. }
  24. src_configure() {
  25. tc-export CC
  26. export PREFIX="${EPREFIX}/usr"
  27. MAKEOPTS+=" LIBUDEV=$(usex udev 0 1)"
  28. }