summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: 887ff721692e390c9e41265cb90e7d8d490cd1f3 (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
# Maintainer: Sven Karsten Greiner <sven@sammyshp.de>

pkgbase=acarsdec-git
pkgname=("$pkgbase-airspy" "$pkgbase-rtl-sdr")
pkgver=3.4.r124.de0c5ae
pkgrel=1
arch=('x86_64')
url="https://github.com/TLeconte/acarsdec"
license=('GPL')
makedepends=('airspy' 'cmake' 'git' 'libusb' 'rtl-sdr')
optdepends=('acarsserv: Store messages in sqlite database')
provides=("${pkgbase%-git}")
conflicts=("${pkgbase%-git}")
source=("$pkgbase::git+https://github.com/TLeconte/acarsdec.git")
sha256sums=('SKIP')

pkgver() {
  cd "$pkgbase"
  git describe --long --tags --match 'acarsdec-*' | sed 's/^acarsdec.//;s/\([^-]*-\)g/r\1/;s/-/./g'
}

build() {
  cd "$pkgbase"

  mkdir -p build-airspy
  cd build-airspy
  cmake .. -Dairspy=ON
  make
  cd ..

  mkdir -p build-rtl
  cd build-rtl
  cmake .. -Drtl=ON
  make
  cd ..
}

package_acarsdec-git-airspy() {
  pkgdesc="Multi-channel ACARS decoder with airspy backend"
  depends=('airspy' 'libusb')

  cd "$pkgbase"
  install -Dm755 build-airspy/acarsdec "$pkgdir/usr/bin/acarsdec"
}

package_acarsdec-git-rtl-sdr() {
  pkgdesc="Multi-channel ACARS decoder with rtl_sdr backend"
  depends=('rtl-sdr')

  cd "$pkgbase"
  install -Dm755 build-rtl/acarsdec "$pkgdir/usr/bin/acarsdec"
}