PKGBUILD 2.0 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374
  1. # Maintainer (Arch): Kyle Keen <keenerd@gmail.com>
  2. # Contributor (Arch): Dominik Heidler <dheidler@gmail.com>
  3. # Maintainer: Omar Vega Ramos <ovruni@gnu.org.pe>
  4. # it looks like the release model has gotten better
  5. # keeping it more modular for now though
  6. # parabola changes and rationale:
  7. # - removed semifree firmware and image blobs. we can't build them because
  8. # proprietary toolchains and libraries are required.
  9. pkgname=bladerf
  10. _libver=2.0.2
  11. _CLIver=1.5.1
  12. _FPGAver=0.10.2
  13. _firmver=2.3.2
  14. pkgver=$_libver
  15. pkgrel=1
  16. pkgrel+=.par1
  17. pkgdesc="Driver, userspace for the bladeRF SDR."
  18. url="https://github.com/Nuand/bladeRF"
  19. # https://github.com/Nuand/bladeRF/tags
  20. arch=('x86_64')
  21. arch+=('i686' 'armv7h')
  22. license=('GPL2')
  23. depends=('libusb')
  24. makedepends=('cmake' 'help2man' 'doxygen')
  25. #backup=("etc/bladerf.cfg")
  26. source=("https://github.com/Nuand/bladeRF/archive/libbladeRF_v$_libver.tar.gz")
  27. md5sums=('ac1ace151d1039c5a88d59b155e17e02')
  28. sha256sums=('87ed1ce383d9536602b2a7bbff1c780903bac90c815df9cb286c9217bf421adb')
  29. # bladeRF-cli is bundled with libbladeRF
  30. # bladeRF-cli can use libtecla (aur)?
  31. prepare() {
  32. cd "$srcdir/bladeRF-libbladeRF_v$_libver"
  33. # FS#47168
  34. sed -i 's|MODE.*$|TAG+="uaccess"|' host/misc/udev/88-nuand.rules.in
  35. # todo, report warning
  36. sed -i '94i add_definitions(-Wno-error=format-truncation)' host/CMakeLists.txt
  37. # FS#55326
  38. sed -i '44s/^else/#&/' host/misc/udev/CMakeLists.txt
  39. }
  40. build() {
  41. cd "$srcdir/bladeRF-libbladeRF_v$_libver"
  42. mkdir -p build
  43. cd build
  44. CFLAGS+=" -Wno-error=stringop-truncation" cmake \
  45. -DCMAKE_BUILD_TYPE=Release \
  46. -DINSTALL_UDEV_RULES=ON \
  47. -DBUILD_DOCUMENTATION=ON \
  48. -DCMAKE_INSTALL_LIBDIR:PATH=lib \
  49. -Dusb_LIBRARY:FILEPATH=/usr/lib/libusb-1.0.so \
  50. -DCMAKE_INSTALL_PREFIX=/usr ../
  51. make
  52. # ENABLE_FX3_BUILD needs cypress toolchain
  53. # really really wants to put files in /usr/lib64
  54. }
  55. package() {
  56. cd "$srcdir/bladeRF-libbladeRF_v$_libver/build"
  57. make DESTDIR="${pkgdir}" install
  58. # FS#54105
  59. cd "$pkgdir/etc/udev/rules.d/"
  60. mv 88-nuand.rules 70-nuand.rules
  61. }