summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: 539652905dc2264a0d56013f0a5012304ee017b3 (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
# Maintainer: 9M2PJU <9m2pju@hamradio.my>
pkgname=pat-git
pkgver=0.13.1.r134.gabc1234
pkgrel=1
pkgdesc="Cross-platform Winlink client with Web UI (git version)"
arch=('x86_64')
url="https://github.com/la5nta/pat"
license=('MIT')
depends=()
makedepends=('go' 'git')
provides=('pat')
conflicts=('pat')
install=pat-git.install
source=("git+https://github.com/la5nta/pat.git")
sha256sums=('SKIP')

pkgver() {
  cd "$srcdir/pat"
  git describe --tags --long --always | sed 's/^v//; s/-/r/; s/-/./'
}

build() {
  cd "$srcdir/pat"
  go build -o pat
}

package() {
  cd "$srcdir/pat"

  # Install binary
  install -Dm755 pat "$pkgdir/usr/bin/pat"

  # License & docs
  install -Dm644 LICENSE "$pkgdir/usr/share/licenses/$pkgname/LICENSE"
  install -Dm644 README.md "$pkgdir/usr/share/doc/$pkgname/README.md"

  # Web UI
  install -d "$pkgdir/usr/share/pat/web"
  cp -r web/* "$pkgdir/usr/share/pat/web"
}