PKGBUILDs/community/libuhd/PKGBUILD
2018-09-21 19:02:36 +00:00

58 lines
1.6 KiB
Bash

# Maintainer: Kyle Keen <keenerd@gmail.com>
# Contributor: Dominik Heidler <dheidler@gmail.com>
# ALARM: Kevin Mihelich <kevin@archlinuxarm.org>
# - patch out ineffectual neon check
pkgname=libuhd
pkgver=3.13.0.1
pkgrel=2
pkgdesc="Universal Software Radio Peripheral (USRP) userspace driver"
arch=('x86_64')
url="http://www.ettus.com/kb/category/software-documentation/uhd-manual"
license=('GPL')
depends=('boost-libs' 'orc' 'libusb')
optdepends=('python2: usrp utils')
makedepends=('cmake' 'boost' 'python2-mako')
source=("libuhd-$pkgver.tar.gz::https://github.com/EttusResearch/uhd/archive/v$pkgver.tar.gz"
'boost-1.67.patch'
'0001-remove-ineffectual-neon-check.patch')
md5sums=('e7c38546d9dadac41657ee5e53c3f342'
'45fcc6feb0ea9b4ae09e4ba7b010864f'
'2cb16216ee735ab1160e572d523155ea')
prepare() {
cd "$srcdir/uhd-$pkgver"
patch -Np1 -i ../boost-1.67.patch
patch -Np1 -i ../0001-remove-ineffectual-neon-check.patch
}
build() {
cd "$srcdir/uhd-$pkgver/host"
# fix for py2
find -name "*.py" -or -name '*.py.in' | xargs sed -i "s|#!/usr/bin/env python$|#!/usr/bin/env python2|"
mkdir -p build
cd build
cmake .. -DCMAKE_INSTALL_PREFIX=/usr/ \
-DPYTHON_EXECUTABLE=/usr/bin/python2 \
-DENABLE_EXAMPLES=OFF \
-DENABLE_UTILS=ON \
-DENABLE_TESTS=OFF \
-DENABLE_E100=ON \
-DENABLE_E300=ON
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"
}