PKGBUILDs/community/libuhd/PKGBUILD
2021-12-19 05:28:53 +00:00

54 lines
1.5 KiB
Bash

# Maintainer: Kyle Keen <keenerd@gmail.com>
# Contributor: Dominik Heidler <dheidler@gmail.com>
# ALARM: Kevin Mihelich <kevin@archlinuxarm.org>
# - set -DNEON_SIMD_ENABLE=OFF
# - explicitly link v5/v6 with libatomic
pkgname=libuhd
pkgver=4.1.0.1
pkgrel=5
pkgdesc="Universal Software Radio Peripheral (USRP) userspace driver"
arch=('x86_64')
url="https://files.ettus.com/manual/"
license=('GPL')
depends=('boost-libs' 'orc' 'libusb')
optdepends=('python: usrp utils'
'python-numpy: python api')
makedepends=('cmake' 'boost' 'python-mako' 'python-numpy')
# gpsd? dpdk?
source=("libuhd-$pkgver.tar.gz::https://github.com/EttusResearch/uhd/archive/v$pkgver.tar.gz")
sha256sums=('e468d5f118c84174754b34613d2b2b9e5fcab9c49062fe3ff7c209c9ac37da7b')
prepare() {
cd "$srcdir/uhd-$pkgver/host"
mkdir build
}
build() {
cd "$srcdir/uhd-$pkgver/host/build"
[[ $CARCH == "arm" || $CARCH == "armv6h" ]] && echo "target_link_libraries(uhd atomic)" >> "$srcdir/uhd-$pkgver/host/lib/CMakeLists.txt"
cmake .. -DCMAKE_INSTALL_PREFIX=/usr/ \
-DPYTHON_EXECUTABLE=/usr/bin/python3 \
-DENABLE_PYTHON_API=ON \
-DENABLE_EXAMPLES=OFF \
-DENABLE_UTILS=ON \
-DENABLE_TESTS=OFF \
-DENABLE_E100=ON \
-DENABLE_E300=ON \
-DNEON_SIMD_ENABLE=OFF
make
}
check() {
cd "$srcdir/uhd-$pkgver/host/build"
make test
}
package() {
cd "$srcdir/uhd-$pkgver/host/build"
make DESTDIR="$pkgdir" install
install -Dm644 "../utils/uhd-usrp.rules" "$pkgdir/usr/lib/udev/rules.d/10-uhd-usrp.rules"
}