diff options
author | fuero | 2018-08-17 13:43:14 +0200 |
---|---|---|
committer | fuero | 2018-08-17 13:43:14 +0200 |
commit | c96eaeed1e97100fe1a3f4728e932a09d8fb3679 (patch) | |
tree | b0dcee2583c2cf522d6a7078f0643b52da97f579 | |
download | aur-c96eaeed1e97100fe1a3f4728e932a09d8fb3679.tar.gz |
initial commit
-rw-r--r-- | .SRCINFO | 17 | ||||
-rw-r--r-- | .gitignore | 3 | ||||
-rw-r--r-- | PKGBUILD | 73 |
3 files changed, 93 insertions, 0 deletions
diff --git a/.SRCINFO b/.SRCINFO new file mode 100644 index 000000000000..fd0fe177405c --- /dev/null +++ b/.SRCINFO @@ -0,0 +1,17 @@ +pkgbase = govmomi-git + pkgdesc = A Go library for interacting with VMware vSphere APIs (ESXi and/or vCenter). + pkgver = r1823.badd514 + pkgrel = 1 + url = https://github.com/vmware/govmomi + arch = x86_64 + license = Apache + makedepends = go-pie + makedepends = git + depends = glibc + provides = govmomi + conflicts = govmomi + source = git+https://github.com/vmware/govmomi#commit=master + sha512sums = SKIP + +pkgname = govmomi-git + diff --git a/.gitignore b/.gitignore new file mode 100644 index 000000000000..ff44301517d4 --- /dev/null +++ b/.gitignore @@ -0,0 +1,3 @@ +/govmomi/ +*.tar.gz +*.pkg.tar.xz diff --git a/PKGBUILD b/PKGBUILD new file mode 100644 index 000000000000..153db78cdb24 --- /dev/null +++ b/PKGBUILD @@ -0,0 +1,73 @@ +# Maintainer : fuero <fuerob@gmail.com> + +pkgname='govmomi-git' +pkgdesc='A Go library for interacting with VMware vSphere APIs (ESXi and/or vCenter).' +pkgver=r1823.badd514 +pkgrel=1 +_repo_prefix='github.com/vmware' +_repo_name="${pkgname/-git}" +url="https://${_repo_prefix}/${_repo_name}" +license=('Apache') +arch=('x86_64') +makedepends=('go-pie' 'git') +depends=('glibc') +conflicts=('govmomi') +provides=('govmomi') +_commit='master' +source=("git+https://${_repo_prefix}/${_repo_name}#commit=${_commit}") +sha512sums=('SKIP') + +pkgver() { + cd "$_repo_name" + printf "r%s.%s" "$(git rev-list --count HEAD)" "$(git rev-parse --short HEAD)" +} + +prepare () { + mkdir -p "src/${_repo_prefix}" + ln -snf "$(pwd)/${_repo_name}" "src/${_repo_prefix}/${_repo_name}" +} + +clean() { + # Clean up symlink + rm -f "src/${_repo_prefix}/${_repo_name}" + rm -f ${_repo_name}.bin +} + +_gobuild() { + export GOPATH="${srcdir}" + export PATH="$PATH:$GOPATH/bin" + + go build -x -i -v -o $1 +} + +build () { + cd "src/${_repo_prefix}/${_repo_name}" + + #go build -x -i -v -ldflags "-X main.commit=${pkgver##*.} -X main.date=$(date -u +%Y%m%d.%H%M%S) -X main.version=$(cat VERSION).${pkgver##*.}" -o ${_repo_name}.bin + for i in govc vcsim + do + cd $i + _gobuild ${i}.bin + cd - + done +} + +package () { + cd "src/${_repo_prefix}/${_repo_name}" + install -Dm644 "LICENSE.txt" "${pkgdir}/usr/share/licenses/${pkgname}/LICENSE" + 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 +} |