diff options
author | Andreas Grapentin <andreas@grapentin.org> | 2018-01-25 18:27:50 +0100 |
---|---|---|
committer | Andreas Grapentin <andreas@grapentin.org> | 2018-01-25 18:28:04 +0100 |
commit | cd4d7e904b34dece801d4d2df7681f5dce7f4035 (patch) | |
tree | 9187c4845336efcc07c02e076c1c9f6730139972 /libre/bladerf/PKGBUILD | |
parent | 97cc3e45c3cc622f1989dca0ed0c1649a6935025 (diff) | |
download | abslibre-cd4d7e904b34dece801d4d2df7681f5dce7f4035.tar.gz abslibre-cd4d7e904b34dece801d4d2df7681f5dce7f4035.tar.bz2 abslibre-cd4d7e904b34dece801d4d2df7681f5dce7f4035.zip |
libre/bladerf: added to replace community/bladerf
Diffstat (limited to 'libre/bladerf/PKGBUILD')
-rw-r--r-- | libre/bladerf/PKGBUILD | 70 |
1 files changed, 70 insertions, 0 deletions
diff --git a/libre/bladerf/PKGBUILD b/libre/bladerf/PKGBUILD new file mode 100644 index 000000000..ae49afbac --- /dev/null +++ b/libre/bladerf/PKGBUILD @@ -0,0 +1,70 @@ +# $Id$ +# Maintainer: Kyle Keen <keenerd@gmail.com> +# Contributor: Dominik Heidler <dheidler@gmail.com> + +# it looks like the release model has gotten better +# keeping it more modular for now though + +# parabola changes and rationale: +# - removed semifree firmware and image blobs. we can't build them because +# proprietary toolchains and libraries are required. + +pkgname=bladerf +_libver=1.8.0 +_CLIver=1.4.0 +_FPGAver=0.6.0 # 0.7.0 fpga stuff is out, but still waiting for binaries +_firmver=2.0.0 +pkgver=$_libver +pkgrel=1.parabola1 +pkgdesc="Driver, userspace for the bladeRF SDR." +url="https://github.com/Nuand/bladeRF" +# https://github.com/Nuand/bladeRF/tags +arch=('x86_64' 'i686' 'armv7h') +license=('GPL2') +depends=('libusb') +makedepends=('cmake' 'help2man' 'doxygen') +#backup=("etc/bladerf.cfg") + +source=("https://github.com/Nuand/bladeRF/archive/libbladeRF_v$_libver.tar.gz") + +md5sums=('7b021646d779205ff2945fed49634001') + +# bladeRF-cli is bundled with libbladeRF +# bladeRF-cli can use libtecla (aur)? + +prepare() { + cd "$srcdir/bladeRF-libbladeRF_v$_libver" + # FS#47168 + sed -i 's|MODE.*$|TAG+="uaccess"|' host/misc/udev/88-nuand.rules.in + + # todo, report warning + sed -i '94i add_definitions(-Wno-error=format-truncation)' host/CMakeLists.txt + + # FS#55326 + sed -i '44s/^else/#&/' host/misc/udev/CMakeLists.txt +} + +build() { + cd "$srcdir/bladeRF-libbladeRF_v$_libver" + mkdir -p build + cd build + cmake \ + -DCMAKE_BUILD_TYPE=Release \ + -DINSTALL_UDEV_RULES=ON \ + -DBUILD_DOCUMENTATION=ON \ + -DCMAKE_INSTALL_LIBDIR:PATH=lib \ + -Dusb_LIBRARY:FILEPATH=/usr/lib/libusb-1.0.so \ + -DCMAKE_INSTALL_PREFIX=/usr ../ + make + # ENABLE_FX3_BUILD needs cypress toolchain + # really really wants to put files in /usr/lib64 +} + +package() { + cd "$srcdir/bladeRF-libbladeRF_v$_libver/build" + make DESTDIR="${pkgdir}" install + + # FS#54105 + cd "$pkgdir/etc/udev/rules.d/" + mv 88-nuand.rules 70-nuand.rules +} |