aboutsummarylogtreecommitdiffstats
path: root/PKGBUILD
blob: 80341e7235f77cde764cd01e0dafcfc7b263a860 (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
47
# Maintainer: Simon Walker <s.r.walker101@googlemail.com>
pkgname=terraform-provider-libvirt-git
pkgver=r841.753afd8a074e
pkgrel=1
epoch=
pkgdesc="Provision libvirt machines with terraform"
arch=("x86_64")
url="https://github.com/dmacvicar/terraform-provider-libvirt"
license=("Apache")
groups=()
depends=("libvirt")
makedepends=("go-pie")
checkdepends=()
optdepends=()
provides=()
conflicts=()
replaces=()
backup=()
options=()
install=
changelog=
source=("git+${url}")
noextract=()
md5sums=()
validpgpkeys=()
sha256sums=('SKIP')

pkgver() {
    cd terraform-provider-libvirt
    printf "r%s.%s" "$(git rev-list --count HEAD)" "$(git rev-parse --short HEAD)"
}

build() {
    cd terraform-provider-libvirt

    go build \
        -gcflags "all=-trimpath=${PWD}" \
        -asmflags "all=-trimpath=${PWD}" \
        -ldflags "-extldflags ${LDFLAGS}"
    }

package() {
    (
    cd "terraform-provider-libvirt"
    install -Dm755 ./terraform-provider-libvirt "${pkgdir}/usr/bin/terraform-provider-libvirt"
    )
}