aboutsummaryrefslogtreecommitdiffstats
path: root/testing/librtlsdr/APKBUILD
blob: 5a6b38bdd41f8eb4630e3e999cd60c93be932e97 (plain)
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
33
34
35
36
37
38
39
# Contributor: Jared Szechy <jared.szechy@gmail.com>
# Maintainer: Jared Szechy <jared.szechy@gmail.com>
pkgname=librtlsdr
pkgver=0.5.4
pkgrel=0
pkgdesc="Software defined radio receiver for Realtek RTL2832U"
url="https://osmocom.org/projects/sdr/wiki/rtl-sdr"
arch="all"
license="GPL-2.0"
depends_dev="libusb-dev"
makedepends="$depends_dev cmake"
subpackages="$pkgname-dev rtl-sdr:tools"
source="$pkgname-$pkgver.tar.gz::https://github.com/steve-m/$pkgname/archive/v$pkgver.tar.gz"

builddir="$srcdir/$pkgname-$pkgver"

build() {
	cd "$builddir"
	mkdir -p build
	cd build
	cmake -DCMAKE_BUILD_TYPE=Release \
		-DCMAKE_INSTALL_PREFIX:PATH=/usr \
		-DDETACH_KERNEL_DRIVER=ON \
		-Wno-dev ..
	make
}

package() {
	cd "$builddir"/build
	make DESTDIR="$pkgdir" install
}

tools() {
	pkgdesc="Software defined radio receiver for Realtek RTL2832U (tools)"
	mkdir -p "$subpkgdir"/usr
	mv "$pkgdir"/usr/bin "$subpkgdir"/usr/
}

sha512sums="81d01ccced763d728b4bb1aeff4bc04c394d4d6906f1df5c8b83671769bb4ca551017fea680981431a9e9436644a765b049259e42fcec1be8b709a81daf420ea  librtlsdr-0.5.4.tar.gz"