summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: ad3378abcb896943604eae16196788c477cc7a57 (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
# Maintainer: Adam Goldsmith <contact@adamgoldsmith.name>

_pkgname=rtlamr-collect
pkgname=rtlamr-collect-git
pkgver=r31.7951486
pkgrel=1
pkgdesc=" Data aggregation for rtlamr."
arch=('any')
url="https://github.com/bemasher/rtlamr-collect"
source=("git+https://github.com/bemasher/rtlamr-collect.git")
md5sums=('SKIP')
license=('AGPL3')
depends=('rtl-sdr')
makedepends=('go' 'git')
provides=('rtlamr-collect')
conflicts=('rtlamr-collect')
options=('!strip' '!emptydirs')
_gourl=github.com/bemasher/rtlamr-collect

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

prepare(){
  mkdir -p gopath/src/${_gourl%/*}
  ln -rTsf $_pkgname gopath/src/$_gourl
}

build() {
  export GOPATH="$srcdir"/gopath
  cd gopath/src/$_gourl
  go install \
     -trimpath \
     -modcacherw \
     -ldflags "-extldflags $LDFLAGS" \
     -v ./...
}

check() {
  export GOPATH="$srcdir"/gopath
  cd gopath/src/$_gourl
  go test ./...
}


package() {
  install -p -Dm755 gopath/bin/rtlamr-collect "$pkgdir/usr/bin/rtlamr-collect"
}

# vim:set ts=2 sw=2 et: