PKGBUILDs/community/libuhd/PKGBUILD

50 lines
1.4 KiB
Bash
Raw Normal View History

2015-08-08 04:55:33 +00:00
# $Id$
# Maintainer: Kyle Keen <keenerd@gmail.com>
# Contributor: Dominik Heidler <dheidler@gmail.com>
2016-01-14 00:50:24 +00:00
# remove when bumped upstream
2015-08-08 04:55:33 +00:00
pkgname=libuhd
2016-01-13 18:16:41 +00:00
pkgver=3.9.2
_verstring='003_009_002'
pkgrel=1
2015-08-08 04:55:33 +00:00
pkgdesc="Universal Software Radio Peripheral (USRP) userspace driver"
arch=('x86_64' 'i686')
2015-11-03 19:21:34 +00:00
url="http://www.ettus.com/kb/category/software-documentation/uhd-manual"
2015-08-08 04:55:33 +00:00
license=('GPL')
depends=('boost-libs' 'orc' 'libusbx')
optdepends=('python2: usrp utils')
2015-11-03 19:21:34 +00:00
makedepends=('cmake' 'boost' 'python2-cheetah' 'python2-mako')
2015-08-08 04:55:33 +00:00
source=("libuhd-$pkgver.tar.gz::https://github.com/EttusResearch/uhd/archive/release_${_verstring}.tar.gz")
2016-01-13 18:16:41 +00:00
md5sums=('d402bc374938118cdc66e8b74aab2cd0')
2015-08-08 04:55:33 +00:00
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 $CONFIG
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"
}