summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: d3565be638ea310aeb3b12db6d96294bed6132cf (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
# Maintainer: zneix <zneix@zneix.eu>

pkgname=twitch-cli-git
pkgver=r224.b779fcf
pkgrel=1
pkgdesc='The official Twitch CLI to make developing on Twitch easier, git version'
arch=('x86_64')
url=https://github.com/twitchdev/twitch-cli
license=('Apache')
depends=()
makedepends=('go' 'git')
provides=('twitch-cli')
conflicts=('twitch-cli-bin')
source=("twitch-cli::git+https://github.com/twitchdev/twitch-cli.git")
sha256sums=('SKIP')

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

build() {
    cd "$srcdir/twitch-cli"
    go build --ldflags "-X main.buildVersion=source" -o twitch
}

package() {
    cd "$srcdir/twitch-cli"
    install -Dm 755 twitch "$pkgdir/usr/bin/twitch"
    install -Dm 644 LICENSE "$pkgdir/usr/share/licenses/$pkgname/LICENSE"
}