summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: 567024c9a3aa17056540198ad8be1f715402950c (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
# Maintainer: Guillaume Fournier-Mayer <giom@mailbox.org>
pkgname=hcloud
pkgver=1.29.0
pkgrel=3
arch=('any')
makedepends=('git' 'golang')
url="https://github.com/hetznercloud/cli.git"
pkgdesc="A command-line interface for Hetzner Cloud"
sha256sums=('SKIP')
source=("git+${url}/#tag=v${pkgver}")
conflicts=("hcloud-cli")


prepare(){
    cd cli/internal/version
    sed -i "s/was not built properly/v${pkgver}/" version.go
}

build(){
    cd cli/
    go build -o hcloud cmd/hcloud/main.go
}

package() {
    cd cli/
    mkdir -p "${pkgdir}/usr/bin"
    cp hcloud "${pkgdir}/usr/bin/"
}