hackrf-tools-2015.07.2-r1.ebuild 1.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445
  1. # Copyright 1999-2015 Gentoo Foundation
  2. # Distributed under the terms of the GNU General Public License v2
  3. EAPI=5
  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-2
  10. KEYWORDS=""
  11. EGIT_SOURCEDIR="${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. RDEPEND="${DEPEND}"
  23. src_install() {
  24. cmake-utils_src_install
  25. if [[ ${PV} != "9999" ]] ; then
  26. insinto /usr/share/hackrf
  27. newins "${WORKDIR}/hackrf-${PV}/firmware-bin/hackrf_jawbreaker_usb_rom_to_ram.bin" hackrf_jawbreaker_usb_rom_to_ram-${PV}.bin
  28. newins "${WORKDIR}/hackrf-${PV}/firmware-bin/hackrf_jawbreaker_usb_ram.dfu" hackrf_jawbreaker_usb_ram-${PV}.dfu
  29. newins "${WORKDIR}/hackrf-${PV}/firmware-bin/hackrf_one_usb_rom_to_ram.bin" hackrf_one_usb_rom_to_ram-${PV}.bin
  30. newins "${WORKDIR}/hackrf-${PV}/firmware-bin/hackrf_one_usb_ram.dfu" hackrf_one_usb_ram-${PV}.dfu
  31. newins "${WORKDIR}/hackrf-${PV}/firmware/cpld/sgpio_if/default.xsvf" hackrf_cpld_default-${PV}.xsvf
  32. ln -s hackrf_one_usb_rom_to_ram-${PV}.bin "${ED}/usr/share/hackrf/hackrf_one_usb_rom_to_ram.bin"
  33. ln -s hackrf_one_usb_ram-${PV}.dfu "${ED}/usr/share/hackrf/hackrf_one_usb_ram.dfu"
  34. else
  35. ewarn "The compiled firmware files are only available in the versioned releases, you are on your own for this."
  36. fi
  37. }