summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: 585ebcb3cc73ca35616ab45bf40b647537320ab9 (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
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
# Maintainer:
# Contributor: Henry Jenkins <archlinux.org@henryjenkins.com>

: ${_version_gnuradio:=3.10}

_pkgname="gr-adsb"
pkgname="$_pkgname-git"
pkgver=r212.0f36000
pkgrel=2
pkgdesc="GNURadio blocks for receiving ADS-B modulated radio messages using SDR"
url="https://github.com/mhostetter/gr-adsb"
license=('GPL-3.0-or-later')
arch=('any')

depends=(
  "gnuradio>=$_version_gnuradio"
  'python'
  'python-numpy'
)
makedepends=(
  'boost'
  'cmake'
  'git'
  'ninja'
)

provides=("$_pkgname=${pkgver%%.r*}")
conflicts=("$_pkgname")

_pkgsrc="$_pkgname"
source=("$_pkgsrc"::"git+https://github.com/mhostetter/gr-adsb#branch=maint-$_version_gnuradio")
sha256sums=('SKIP')

pkgver() {
  cd "$_pkgsrc"
  printf "r%s.%s" \
    "$(git rev-list --count HEAD)" \
    "$(git rev-parse --short=7 HEAD)"
}

build() {
  local _cmake_options=(
    -B build
    -S "$_pkgsrc"
    -G Ninja
    -DCMAKE_BUILD_TYPE=None
    -DCMAKE_INSTALL_PREFIX='/usr'
    -Wno-dev
  )

  cmake "${_cmake_options[@]}"
  cmake --build build
}

package() {
  depends+=(
    'python-colorama'
  )

  DESTDIR="$pkgdir" cmake --install build
}