summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: 019cc1e406305948a2ebac93fe5d0365eb3cc083 (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
# Maintainer: Chocobo1 <chocobo1 AT archlinux DOT net>

pkgname=github-cli-git
pkgver=0.5.5.r25.g48ffd5a
pkgrel=2
pkgdesc="The GitHub CLI tool"
arch=('i686' 'x86_64')
url="https://github.com/cli/cli"
license=('MIT')
depends=('glibc')
makedepends=('git' 'go-pie')
optdepends=("git: To interact with repositories")
provides=('github-cli')
conflicts=('github-cli')
source=("git+https://github.com/cli/cli.git")
sha256sums=('SKIP')


pkgver() {
  cd "cli"

  git describe --long --tags | sed 's/^v//;s/\([^-]*-g\)/r\1/;s/-/./g'
}

build() {
  cd "cli"

  go build \
    -trimpath \
    -ldflags "-extldflags $LDFLAGS" \
    ./cmd/gh
}

check() {
  cd "cli"

  go test ./...
}

package() {
  cd "cli"

  install -Dm755 "gh" -t "$pkgdir/usr/bin"
  install -Dm644 "README.md" -t "$pkgdir/usr/share/doc/github-cli"
  install -Dm644 "LICENSE" -t "$pkgdir/usr/share/licenses/github-cli"
}