hackrf-tools-9999.ebuild 1.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748
  1. # Copyright 1999-2017 Gentoo Foundation
  2. # Distributed under the terms of the GNU General Public License v2
  3. EAPI=6
  4. inherit cmake-utils
  5. DESCRIPTION="tools for communicating with HackRF SDR platform"
  6. HOMEPAGE="http://greatscottgadgets.com/hackrf/"
  7. if [[ ${PV} == "9999" ]] ; then
  8. EGIT_REPO_URI="https://github.com/mossmann/hackrf.git"
  9. inherit git-r3
  10. KEYWORDS=""
  11. EGIT_CHECKOUT_DIR="${WORKDIR}/hackrf"
  12. S="${WORKDIR}/hackrf/host/hackrf-tools"
  13. else
  14. S="${WORKDIR}/hackrf-${PV}/host/hackrf-tools"
  15. SRC_URI="https://github.com/mossmann/hackrf/releases/download/v${PV}/hackrf-${PV}.tar.xz"
  16. KEYWORDS="~amd64 ~arm ~ppc ~x86"
  17. fi
  18. LICENSE="BSD"
  19. SLOT="0"
  20. IUSE=""
  21. DEPEND="=net-libs/libhackrf-${PV}:=
  22. sci-libs/fftw:3.0="
  23. RDEPEND="${DEPEND}"
  24. src_install() {
  25. cmake-utils_src_install
  26. if [[ ${PV} != "9999" ]] ; then
  27. insinto /usr/share/hackrf
  28. newins "${WORKDIR}/hackrf-${PV}/firmware-bin/hackrf_jawbreaker_usb.bin" hackrf_jawbreaker_usb-${PV}.bin
  29. newins "${WORKDIR}/hackrf-${PV}/firmware-bin/hackrf_jawbreaker_usb.dfu" hackrf_jawbreaker_usb-${PV}.dfu
  30. newins "${WORKDIR}/hackrf-${PV}/firmware-bin/hackrf_one_usb.bin" hackrf_one_usb-${PV}.bin
  31. newins "${WORKDIR}/hackrf-${PV}/firmware-bin/hackrf_one_usb.dfu" hackrf_one_usb-${PV}.dfu
  32. newins "${WORKDIR}/hackrf-${PV}/firmware-bin/hackrf_cpld_default.xsvf" hackrf_cpld_default-${PV}.xsvf
  33. ln -s hackrf_one_usb-${PV}.bin "${ED}/usr/share/hackrf/hackrf_one_usb_rom_to_ram.bin"
  34. ln -s hackrf_one_usb-${PV}.bin "${ED}/usr/share/hackrf/hackrf_one_usb.bin"
  35. ln -s hackrf_one_usb-${PV}.dfu "${ED}/usr/share/hackrf/hackrf_one_usb_ram.dfu"
  36. ln -s hackrf_one_usb-${PV}.dfu "${ED}/usr/share/hackrf/hackrf_one_usb.dfu"
  37. else
  38. ewarn "The compiled firmware files are only available in the versioned releases, you are on your own for this."
  39. fi
  40. }