PKGBUILDs/community/libuhd/PKGBUILD

57 lines
1.6 KiB
Bash
Raw Normal View History

2016-05-14 17:24:24 +00:00
# $Id$
# 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
2017-09-11 00:31:30 +00:00
pkgver=3.10.2.0
_verstring='003_010_002_000'
pkgrel=1
2016-05-14 17:24:24 +00:00
pkgdesc="Universal Software Radio Peripheral (USRP) userspace driver"
arch=('x86_64' 'i686')
url="http://www.ettus.com/kb/category/software-documentation/uhd-manual"
license=('GPL')
2017-05-29 17:29:28 +00:00
depends=('boost-libs' 'orc' 'libusb')
2016-05-14 17:24:24 +00:00
optdepends=('python2: usrp utils')
makedepends=('cmake' 'boost' 'python2-cheetah' 'python2-mako')
source=("libuhd-$pkgver.tar.gz::https://github.com/EttusResearch/uhd/archive/release_${_verstring}.tar.gz"
'0001-remove-ineffectual-neon-check.patch')
2017-09-11 00:31:30 +00:00
md5sums=('f1e1977cd6c146daf800df681cb22944'
2016-05-14 17:24:24 +00:00
'2cb16216ee735ab1160e572d523155ea')
prepare() {
patch -d uhd-release_$_verstring -p1 -i ../0001-remove-ineffectual-neon-check.patch
}
build() {
cd "$srcdir/uhd-release_$_verstring/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-release_$_verstring/host/build"
make test
}
package() {
cd "$srcdir/uhd-release_$_verstring/host/build"
make DESTDIR="$pkgdir" install
install -Dm644 "../utils/uhd-usrp.rules" "$pkgdir/usr/lib/udev/rules.d/10-uhd-usrp.rules"
}