aboutsummaryrefslogtreecommitdiffstats
path: root/testing/hackrf/APKBUILD
blob: f79ecdc95fa145f41f78ee5edb9132675b938ab3 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
# Contributor: Marian Buschsieweke <marian.buschsieweke@ovgu.de>
# Maintainer: Marian Buschsieweke <marian.buschsieweke@ovgu.de>
pkgname=hackrf
pkgver=2018.01.1
pkgrel=0
pkgdesc="Driver for HackRF, allowing general purpose software defined radio"
url="https://github.com/mossmann/hackrf"
arch="all"
license="GPL-2.0-only"
options="!check"  # no test suite
makedepends="libusb-dev fftw-dev cmake"
subpackages="$pkgname-firmware"
source="$pkgname-$pkgver.tar.xz::https://github.com/mossmann/hackrf/releases/download/v${pkgver}/hackrf-${pkgver}.tar.xz"

build() {
	cmake -B build \
		-DCMAKE_BUILD_TYPE=None \
		-DCMAKE_INSTALL_PREFIX=/usr \
		-DCMAKE_INSTALL_LIBDIR=lib \
		host
	cmake --build build
}

package() {
	DESTDIR="$pkgdir" cmake --build build --target install
}

firmware() {
	find "$builddir/firmware-bin" -type f -exec install -Dm644 -t "$subpkgdir/usr/share/hackrf/" {} \;
}

sha512sums="89848fb58a8a29f7fe85bd817d5716117a2c7a5f2c4bb8582ad1ba8186831ca3054ea1314de943d1e923641eb18b6008cd8af79585e58fa50d55d5a7fd1b04e4  hackrf-2018.01.1.tar.xz"