diff options
author | fuero | 2024-04-22 09:57:35 +0000 |
---|---|---|
committer | fuero | 2024-04-22 09:57:35 +0000 |
commit | 1222dec448d9d6b13d268c4a6ec75325f208796a (patch) | |
tree | b89c9d1d718730484594a1ed03fb5ddb499b5b06 /PKGBUILD | |
download | aur-pv-migrate.tar.gz |
Initial commit
Diffstat (limited to 'PKGBUILD')
-rw-r--r-- | PKGBUILD | 47 |
1 files changed, 47 insertions, 0 deletions
diff --git a/PKGBUILD b/PKGBUILD new file mode 100644 index 000000000000..921735415373 --- /dev/null +++ b/PKGBUILD @@ -0,0 +1,47 @@ +# Maintainer: Fuero <fuerob@gmail.com> + +pkgname=pv-migrate +# renovate: datasource=github-releases depName=utkuozdemir/pv-migrate +pkgver=1.8.0 +pkgrel=1 +pkgdesc='kubectl plugin to easily migrate the contents of one Kubernetes PersistentVolumeClaim to another' +arch=('x86_64') +url=https://github.com/utkuozdemir/pv-migrate +license=('Apache-2.0') +depends=('glibc') +makedepends=('go') +source=("$url/archive/v$pkgver/${pkgname}-$pkgver.tar.gz") +b2sums=('c1e24a6915a596f645b9e7c9ea5ccfa193d8f6a05631a75a1fa3a0de832da67b7265f58b78b2936745deae59b32c23bf8b569a3aaeacae6e10b05872f398aa75') + +prepare() { + cd $pkgname-$pkgver + go mod vendor +} + +build() { + cd $pkgname-$pkgver + export GOFLAGS="-buildmode=pie -trimpath -ldflags=-linkmode=external -modcacherw" + mkdir bin + go build -o bin ./... +} + +check() { + cd $pkgname-$pkgver + go test ./... +} + +package() { + cd $pkgname-$pkgver + install -d "$pkgdir"/usr/share/bash-completion/completions + bin/${pkgname} completion bash > "$pkgdir"/usr/share/bash-completion/completions/${pkgname} + install -d "$pkgdir"/usr/share/zsh/site-functions + bin/${pkgname} completion zsh > "$pkgdir"/usr/share/zsh/site-functions/_${pkgname} + install -Dt "$pkgdir"/usr/bin bin/$pkgname + install -Dm644 -t "$pkgdir"/usr/share/licenses/$pkgname LICENSE + for i in *.md + do + install -Dm644 -t "$pkgdir"/usr/share/doc/$pkgname $i + done +} + +# vim:set ts=2 sw=2 et: |