diff options
author | Filipe Nascimento | 2020-10-21 20:04:36 -0300 |
---|---|---|
committer | Filipe Nascimento | 2020-10-21 20:04:36 -0300 |
commit | 6118770927039bad3eae20d47fbe5608616cee13 (patch) | |
tree | c03523dd685290be72f6ec32ba6ae4596dff9f9b | |
parent | 6dd3d082e187c190f6e3453904de09a482c6173f (diff) | |
download | aur-6118770927039bad3eae20d47fbe5608616cee13.tar.gz |
upgpkg: velero 1.5.2-1
upstream release
-rw-r--r-- | .SRCINFO | 10 | ||||
-rw-r--r-- | PKGBUILD | 41 | ||||
-rw-r--r-- | build.patch | 30 |
3 files changed, 58 insertions, 23 deletions
@@ -1,6 +1,6 @@ pkgbase = velero pkgdesc = Backup and migrate Kubernetes applications and their persistent volumes - pkgver = 1.5.1 + pkgver = 1.5.2 pkgrel = 1 url = https://velero.io arch = x86_64 @@ -8,11 +8,15 @@ pkgbase = velero arch = armv7h arch = aarch64 license = Apache + makedepends = git makedepends = go + depends = glibc depends = kubectl optdepends = restic: for restic integration support - source = velero-1.5.1.tar.gz::https://github.com/vmware-tanzu/velero/archive/v1.5.1.tar.gz - sha256sums = b5d8f50f8f84f08ec7fc72d2572fd15749b3b95f1a0ac2483f3a4fe6f43e4961 + source = git+https://github.com/vmware-tanzu/velero#tag=v1.5.2 + source = build.patch + sha256sums = SKIP + sha256sums = 6a3a98867f35180ed604da9fa608c290107651b5ebba9409bcedd45c395cdda4 pkgname = velero @@ -1,43 +1,44 @@ # Maintainer: Filipe Nascimento <flipee at tuta dot io> pkgname=velero -pkgver=1.5.1 +pkgver=1.5.2 pkgrel=1 pkgdesc="Backup and migrate Kubernetes applications and their persistent volumes" arch=('x86_64' 'armv6h' 'armv7h' 'aarch64') url="https://velero.io" license=('Apache') -depends=('kubectl') -makedepends=('go') +depends=('glibc' 'kubectl') +makedepends=('git' 'go') optdepends=('restic: for restic integration support') -source=("$pkgname-$pkgver.tar.gz::https://github.com/vmware-tanzu/velero/archive/v$pkgver.tar.gz") -sha256sums=('b5d8f50f8f84f08ec7fc72d2572fd15749b3b95f1a0ac2483f3a4fe6f43e4961') +source=("git+https://github.com/vmware-tanzu/velero#tag=v$pkgver" + "build.patch") +sha256sums=('SKIP' + '6a3a98867f35180ed604da9fa608c290107651b5ebba9409bcedd45c395cdda4') + +prepare() { + cd $pkgname + patch -Np1 < ../build.patch + sed -E 's#(OUTPUT_DIR)=\$\$\(pwd\)/_output/bin/\$\(GOOS\)/\$\(GOARCH\)#\1=.#g' -i Makefile +} build() { - cd $pkgname-$pkgver + cd $pkgname export CGO_CPPFLAGS="${CPPFLAGS}" export CGO_CFLAGS="${CFLAGS}" export CGO_CXXFLAGS="${CXXFLAGS}" export CGO_LDFLAGS="${LDFLAGS}" + export GOFLAGS="-buildmode=pie -trimpath -mod=readonly -modcacherw" + export GOLDFLAGS="-linkmode=external" - _commit=87d86a45a6ca66c6c942c7c7f08352e26809426c + make local GIT_TREE_STATE=clean - go build \ - -trimpath \ - -buildmode=pie \ - -mod=readonly \ - -modcacherw \ - -ldflags "-linkmode=external - -X \"github.com/vmware-tanzu/velero/pkg/buildinfo.Version=$pkgver\" - -X \"github.com/vmware-tanzu/velero/pkg/buildinfo.GitSHA=$_commit\" - -X \"github.com/vmware-tanzu/velero/pkg/buildinfo.GitTreeState=clean\"" \ - -o $pkgname cmd/velero/main.go + ./velero completion bash | install -Dm644 /dev/stdin share/bash-completion/completions/velero + ./velero completion zsh | install -Dm644 /dev/stdin share/zsh/site-functions/_velero } package() { - cd $pkgname-$pkgver + cd $pkgname install -Dm755 $pkgname -t "$pkgdir/usr/bin" - $pkgname completion bash | install -Dm644 /dev/stdin "$pkgdir/usr/share/bash-completion/completions/$pkgname" - $pkgname completion zsh | install -Dm644 /dev/stdin "$pkgdir/usr/share/zsh/site-functions/_$pkgname" + cp -r share/ "$pkgdir/usr" } diff --git a/build.patch b/build.patch new file mode 100644 index 000000000000..31e1547027f1 --- /dev/null +++ b/build.patch @@ -0,0 +1,30 @@ +diff --git a/hack/build.sh b/hack/build.sh +index b04378ad..d6f320d1 100755 +--- a/hack/build.sh ++++ b/hack/build.sh +@@ -51,22 +51,13 @@ if [[ -z "${GIT_TREE_STATE}" ]]; then + exit 1 + fi + +-export CGO_ENABLED=0 ++export CGO_ENABLED=1 + +-LDFLAGS="-X ${PKG}/pkg/buildinfo.Version=${VERSION}" ++LDFLAGS="${GOLDFLAGS} -X ${PKG}/pkg/buildinfo.Version=${VERSION}" + LDFLAGS="${LDFLAGS} -X ${PKG}/pkg/buildinfo.GitSHA=${GIT_SHA}" + LDFLAGS="${LDFLAGS} -X ${PKG}/pkg/buildinfo.GitTreeState=${GIT_TREE_STATE}" + +-if [[ -z "${OUTPUT_DIR:-}" ]]; then +- OUTPUT_DIR=. +-fi +-OUTPUT=${OUTPUT_DIR}/${BIN} +-if [[ "${GOOS}" = "windows" ]]; then +- OUTPUT="${OUTPUT}.exe" +-fi +- + go build \ +- -o ${OUTPUT} \ +- -installsuffix "static" \ ++ -o ${OUTPUT_DIR} \ + -ldflags "${LDFLAGS}" \ + ${PKG}/cmd/${BIN} |