Last active
December 31, 2018 04:54
-
-
Save tonylambiris/73ef3075ede3bc60bff7411c789c50d3 to your computer and use it in GitHub Desktop.
Updated libbladerf-git PKGBUILD for the AUR
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Maintainer: Stefan Biereigel <stefan@biereigel.de> | |
pkgname=libbladerf-git | |
pkgver=2018.12.rc3.r3.g3bb8ad61 | |
pkgrel=1 | |
pkgdesc="Driver and userspace for the bladeRF SDR." | |
url="https://github.com/Nuand/bladeRF" | |
arch=('i686' 'x86_64') | |
license=('GPL2') | |
depends=('libusb') | |
provides=('bladerf') | |
conflicts=('bladerf') | |
makedepends=('cmake' 'help2man' 'doxygen') | |
source=("git+https://github.com/Nuand/bladeRF" | |
"https://www.nuand.com/fpga/hostedxA4-latest.rbf" | |
"https://www.nuand.com/fpga/hostedxA9-latest.rbf" | |
"https://www.nuand.com/fpga/hostedx40-latest.rbf" | |
"https://www.nuand.com/fpga/hostedx115-latest.rbf" | |
"https://www.nuand.com/fx3/bladeRF_fw_latest.img") | |
md5sums=('SKIP' | |
'b3f8b37fccee3eacb85aeb4f9fe89b2b' | |
'f4833d63f594b0a8c51c579d6f72181e' | |
'4aabf1617901423569f425db93598884' | |
'33641f8a126bef1c0b7e6ba8bedda93f' | |
'c823ea5aa2c25c26bbaf4ab395ac559d') | |
prepare() { | |
cd "$srcdir/bladeRF" | |
sed -i 's|MODE.*$|TAG+="uaccess"|' host/misc/udev/88-nuand-bladerf1.rules.in | |
sed -i 's|MODE.*$|TAG+="uaccess"|' host/misc/udev/88-nuand-bladerf2.rules.in | |
sed -i 's|MODE.*$|TAG+="uaccess"|' host/misc/udev/88-nuand-bootloader.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 | |
} | |
pkgver() { | |
cd "$srcdir/bladeRF" | |
git describe --long --tags | sed -E 's/([^-]*-g)/r\1/;s/-/./g' | |
} | |
build() { | |
cd "$srcdir/bladeRF" | |
mkdir -p build | |
cd build | |
CFLAGS+=" -Wno-error=stringop-truncation" 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/build" | |
make DESTDIR="${pkgdir}" install | |
cd "$srcdir" | |
install -Dm644 bladeRF_fw_latest.img "$pkgdir/usr/share/Nuand/bladeRF/firmware/bladeRF_fw_latest.img" | |
install -Dm644 hostedxA4-latest.rbf "$pkgdir/usr/share/Nuand/bladeRF/hostedxA4.rbf" | |
install -Dm644 hostedxA9-latest.rbf "$pkgdir/usr/share/Nuand/bladeRF/hostedxA9.rbf" | |
install -Dm644 hostedx40-latest.rbf "$pkgdir/usr/share/Nuand/bladeRF/hostedx40.rbf" | |
install -Dm644 hostedx115-latest.rbf "$pkgdir/usr/share/Nuand/bladeRF/hostedx115.rbf" | |
# FS#54105 | |
cd "$pkgdir/etc/udev/rules.d/" | |
mv 88-nuand-bladerf1.rules 70-nuand-bladerf1.rules | |
mv 88-nuand-bladerf2.rules 70-nuand-bladerf2.rules | |
mv 88-nuand-bootloader.rules 70-nuand-bootloader.rules | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment