summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: 63b8524b98ab5959ee63a87b7513dbb0db92e9fb (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
# Contributor : anish [ at ] gatech [dot] edu
# Maintainer  : anish [ at ] gatech [dot] edu

pkgname=piaware-git
_gitname=piaware
pkgver=3.0.2.r0.g1fd4d7f
pkgrel=2

pkgdesc="Client-side package and programs for forwarding ADS-B data to FlightAware"

arch=('i686' 'x86_64' 'armv6h' 'armv7h')
url="https://github.com/flightaware/piaware"
license=('BSD')

depends=('dump1090-fa-git' 'tcl' 'tcllib' 'tclx' 'tk' 'tls' 'python' 'tcllauncher')
makedepends=('git' 'autoconf' 'tcl' 'python' 'tcllauncher')
optdepends=('mlat-client: M-LAT support')

source=('piaware::git+git://github.com/flightaware/piaware'
        'piaware.conf')
md5sums=('SKIP'
         '9fcbaadb1d08e755c3c1e7e577f0ac32')
install=piaware-git.install
backup=('etc/piaware.conf')

_gitname=piaware

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

package() {

  install -D /usr/bin/tcllauncher ${pkgdir}/usr/bin/tcllauncher
  cd "${srcdir}/${_gitname}"
  make install DESTDIR=${pkgdir} SYSTEMD=/usr/lib/systemd/system
  rm ${pkgdir}/usr/bin/tcllauncher

  install -dm750 ${pkgdir}/etc/sudoers.d/
  install -Dm644 etc/piaware.sudoers ${pkgdir}/etc/sudoers.d/01piaware
  install -Dm644 ${srcdir}/piaware.conf ${pkgdir}/etc/piaware.conf
  chmod -x "${pkgdir}/usr/lib/systemd/system/piaware.service"
  install -Dm644 LICENSE.txt ${pkgdir}/usr/share/licenses/${pkgname}/LICENSE
}