summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: 9d17c1a8e28c6f661af832ae264ef7977b75ccd7 (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
# Maintainer: chaewon <64337177+authorisation@users.noreply.github.com>

pkgname=cobalt-cli-git
pkgver=r18.6bd4964
pkgrel=1
pkgdesc="Unofficial cobalt command line client made in go."
arch=(x86_64)
url="https://github.com/lostdusty/cobalt"
license=('MIT')
groups=()
makedepends=('git' 'go')
provides=(cobalt)
source=("git+https://github.com/lostdusty/cobalt")
md5sums=('SKIP')

prepare() {
    cd cobalt

    go mod tidy
}

function pkgver() {
  cd cobalt

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

build() {
  cd cobalt

  go build
}

package() {
  cd cobalt
  
  install -Dm755 cobalt "$pkgdir/usr/bin/cobalt"
}