blob: 93d037a258464e6dcbba483454028262da4e8f00 (
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
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
|
# Maintainer : fuero <fuerob@gmail.com>
# Co-Mantainer: Jeff Henson <jeff@henson.io>
# Co-Mantainer: Andreas 'Segaja' Schleifer <archlinux at segaja dot de>
# Contributor: Josef Vybíhal <josef.vybihal at gmail dot com>
pkgname=govmomi
pkgdesc='A Go library for interacting with VMware vSphere APIs (ESXi and/or vCenter).'
pkgver=0.30.0
pkgrel=1
url="https://github.com/vmware/${pkgname}"
license=('Apache')
arch=('x86_64')
makedepends=('go')
depends=('glibc')
source=("${pkgname}-${pkgver}.tar.gz::${url}/archive/v${pkgver}.tar.gz")
sha512sums=('54cf5e852c7f366611ebd48a172ad6abb71260b73dc5d7d8c9a03cbcc25f9b3a467b8054b132155c63ad12bc34b057b41d72dbeb65fa2e7b11d7df814c4a6fb6')
build() {
cd "${pkgname}-${pkgver}"
export GO11MODULE=on
export CGO_LDFLAGS="${LDFLAGS}"
export CGO_CPPFLAGS="${CPPFLAGS}"
export CGO_CFLAGS="${CFLAGS}"
export CGO_CXXFLAGS="${CXXFLAGS}"
export GOFLAGS="-buildmode=pie -trimpath -ldflags=-linkmode=external -mod=readonly -modcacherw"
for i in govc vcsim; do
cd "${i}"
go build -o "${i}.bin"
cd -
done
}
package () {
cd "${pkgname}-${pkgver}"
install -Dm644 "LICENSE.txt" "${pkgdir}/usr/share/licenses/${pkgname}/LICENSE"
install -d "${pkgdir}/usr/share/${pkgname}"
cp -dr --no-preserve='ownership' "scripts/" "${pkgdir}/usr/share/${pkgname}/"
install -d "${pkgdir}/usr/share/bash-completion/completions"
ln -s "/usr/share/${pkgname}/scripts/govc_bash_completion" "${pkgdir}/usr/share/bash-completion/completions/govc"
for i in govc vcsim; do
cd "${i}"
install -Dm755 ${i}.bin "${pkgdir}/usr/bin/${i}"
for _file in *.md; do
install -Dm644 "${_file}" "${pkgdir}/usr/share/doc/${pkgname}/${i}/${_file}"
done
cd -
done
for _file in *.md; do
install -Dm644 "${_file}" "${pkgdir}/usr/share/doc/${pkgname}/${_file}"
done
}
|