summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: e75e3002effe73f09b3016b3d86948227f8a3f38 (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
# Maintainer: Matthew Treinish <mtreinish@kortar.org>

pkgname=terraform-provider-softlayer
pkgver=1.5.0
pkgrel=1
pkgdesc="Terraform softlayer provider"
url="https://github.com/softlayer/terraform-provider-softlayer"
arch=("i686" "x86_64")
license=("MPL2")
makedepends=("go" "git")
_gourl="github.com/softlayer/"
depends=('terraform')
source=("https://github.com/softlayer/terraform-provider-softlayer/archive/v$pkgver.tar.gz")
sha256sums=('812edd5381c4458a4fb38354cff03660f20fb918090905cc76cd601745724824')


prepare() {
    mkdir -p "$srcdir/src/$_gourl"
    rm -rf "${srcdir}/src/$_gourl/$pkgname"
    mv -f "$pkgname-$pkgver" "$srcdir/src/$_gourl/$pkgname"
    msg2 "Fetching dependencies"
    cd "$srcdir/src/$_gourl/$pkgname"
    GOPATH="$srcdir" go get -u github.com/hashicorp/terraform
}


build() {
    msg2 "Build program"
    cd "$srcdir/src/$_gourl/$pkgname"
    GOPATH="$srcdir" PATH="$srcdir/bin:$PATH" make bin
}


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