1 # Maintainer: Felix Yan <felixonmars@archlinux.org>
2 # Contributor: Dmitry Chusovitin <dchusovitin@gmail.com>
7 pkgdesc='Machine management for a container-centric world'
9 url='https://github.com/docker/machine'
12 optdepends=('net-tools: for VirtualBox support')
14 optdepends=('net-tools: required for VirtualBox driver')
15 source=("$pkgname-$pkgver.tar.gz::https://github.com/docker/machine/archive/v$pkgver.tar.gz")
16 sha512sums=('92408c18be23cee040e96412dafeff16415834c3141b0a9c1f82cb9d6b1e0700344a158a44ffac24fed2c244d3fa5c531d9f13ffffaa4be1f4fcbd79104f899e')
20 mv machine-$pkgver/vendor/* build/src/
21 mkdir -p build/src/github.com/docker
22 ln -s "$srcdir"/machine-$pkgver build/src/github.com/docker/machine
26 export GOPATH="$srcdir/build"
27 export CGO_CPPFLAGS="${CPPFLAGS}"
28 export CGO_CFLAGS="${CFLAGS}"
29 export CGO_CXXFLAGS="${CXXFLAGS}"
30 export CGO_LDFLAGS="${LDFLAGS}"
31 export GOFLAGS="-buildmode=pie -trimpath -mod=readonly -modcacherw"
32 export GO111MODULE=off
35 go build -o bin/docker-machine cmd/docker-machine/machine.go # -gccgoflags "$CFLAGS $LDFLAGS"
40 install -Dm755 bin/docker-machine "$pkgdir"/usr/bin/docker-machine
41 install -Dm644 contrib/completion/bash/docker-machine.bash "$pkgdir"/usr/share/bash-completion/completions/docker-machine
42 install -Dm644 contrib/completion/zsh/_docker-machine "$pkgdir"/usr/share/zsh/site-functions/_docker-machine
43 install -Dm644 LICENSE "$pkgdir"/usr/share/licenses/$pkgname/LICENSE