summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: 646397e790ab2510b35e6222863afc75007a07be (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
# Maintainer: Precise <Discord: precise_pro>

pkgname=rtl-sdr-exp-git
pkgrel=1
pkgver=2023.8.25.a03a3dc
pkgdesc="Turns your Realtek RTL2832 based DVB dongle into a SDR receiver. Experimental R820T/R820T2 rtl-sdr tuner driver that tunes down to 13 MHz or lower. (From my experiments up to 3.4 MHz on R820T2)."
arch=('i686' 'x86_64' 'armv7h' 'aarch64')
url="https://github.com/Mr-Precise/rtl-sdr"
license=('GPL2')
depends=('libusb>=1.0')
makedepends=('git' 'cmake' 'make' 'pkgconf')
provides=('rtl-sdr' 'rtl-sdr-git')
conflicts=('rtl-sdr' 'rtl-sdr-git')
options=('staticlibs')
source=('git+https://github.com/Mr-Precise/rtl-sdr.git')

pkgver() {
  cd "${srcdir}/rtl-sdr"
  printf "%s.%s" "$(git describe --tags --abbrev=0 | sed 's/v//')" "$(git rev-parse --short HEAD)"
}

build() {
  cd "${srcdir}/rtl-sdr"
  mkdir -p build
  cd build
  cmake -G "Unix Makefiles" -DCMAKE_INSTALL_PREFIX:PATH=/usr \
    -DDETACH_KERNEL_DRIVER=ON \
    -DENABLE_ZEROCOPY=ON -Wno-dev ../
  make
}

package() {
  cd "${srcdir}/rtl-sdr/build/"
  make DESTDIR="${pkgdir}" install
  install -D -m644 "${srcdir}/rtl-sdr/rtl-sdr.rules" \
    "${pkgdir}/usr/lib/udev/rules.d/10-rtl-sdr.rules"
}

md5sums=('SKIP')