[arch-commits] Commit in cri-tools/trunk (PKGBUILD)
David Runge
dvzrv at gemini.archlinux.org
Mon May 2 16:11:08 UTC 2022
Date: Monday, May 2, 2022 @ 16:11:08
Author: dvzrv
Revision: 1192251
upgpkg: cri-tools 1.23.0-2: Rebuild against go 1.18.
Remove unneeded quotes and curly braces.
Simplify calls to make and install.
Modified:
cri-tools/trunk/PKGBUILD
----------+
PKGBUILD | 41 +++++++++++++++++++----------------------
1 file changed, 19 insertions(+), 22 deletions(-)
Modified: PKGBUILD
===================================================================
--- PKGBUILD 2022-05-02 15:56:46 UTC (rev 1192250)
+++ PKGBUILD 2022-05-02 16:11:08 UTC (rev 1192251)
@@ -1,10 +1,10 @@
# Maintainer: David Runge <dvzrv at archlinux.org>
pkgbase=cri-tools
-pkgname=('crictl' 'critest')
+pkgname=(crictl critest)
pkgver=1.23.0
_commit='dbe2d141dc73d0c3b7c05aafbe3d01ee2698b197' # v1.23.0
-pkgrel=1
+pkgrel=2
pkgdesc="CLI and validation tools for Kubelet Container Runtime Interface (CRI)"
arch=(x86_64)
url="https://github.com/kubernetes-sigs/cri-tools"
@@ -13,8 +13,9 @@
depends=(glibc)
makedepends=(git go)
# can only build from git: https://github.com/kubernetes-sigs/cri-tools/issues/676
-source=("git+https://github.com/kubernetes-sigs/${pkgbase}#commit=${_commit}"
- "${pkgbase}-1.21.0-makefile.patch"
+source=(
+ git+https://github.com/kubernetes-sigs/$pkgbase#commit=$_commit
+ $pkgbase-1.21.0-makefile.patch
)
sha512sums=('SKIP'
'272be756f3d2514b885e0e9db2c27d851fbea016d58502fa8f5954c6b79ebb240fdbe78577e6a07ca9d737706f0e409fac7a34c664e483359c817922ea8394c2')
@@ -22,13 +23,11 @@
'2f6c0bb70e38ed98de5f2f80a18b1852a82e6614c6acd5a968d6bdc0d4955bb2e8b81050daf50e35a4eb3637e48e879fe0c9b4fc58b4ae3d827246a3dff82710')
prepare() {
- cd "${pkgbase}"
# set CGO_ENABLED, honor GOFLAGS and allow adding to GO_LDFLAGS
- patch -Np1 -i ../"${pkgbase}-1.21.0-makefile.patch"
+ patch -Np1 -d $pkgbase -i ../$pkgbase-1.21.0-makefile.patch
}
build() {
- cd "$pkgbase"
export CGO_CPPFLAGS="${CPPFLAGS}"
export CGO_CFLAGS="${CFLAGS}"
export CGO_CXXFLAGS="${CXXFLAGS}"
@@ -37,14 +36,14 @@
# NOTE: this ensures the binaries have full RELRO
export GO_LDFLAGS="-linkmode=external"
- make
+ make -C $pkgbase
# crictl shell completion
- mkdir -vp build/completions
+ mkdir -vp completions
local _binary
for _binary in crictl; do
- "build/bin/${_binary}" completion bash > "build/completions/${_binary}"
- "build/bin/${_binary}" completion zsh > "build/completions/_${_binary}"
+ $pkgbase/build/bin/$_binary completion bash > completions/$_binary
+ $pkgbase/build/bin/$_binary completion zsh > completions/_$_binary
done
}
@@ -51,23 +50,21 @@
package_crictl() {
pkgdesc="A CLI for CRI-compatible container runtimes"
- cd "$pkgbase"
- install -vDm 755 "build/bin/${pkgname}" -t "${pkgdir}/usr/bin"
+ install -vDm 755 $pkgbase/build/bin/$pkgname -t "$pkgdir/usr/bin/"
# shell completion
- install -vDm 644 "build/completions/${pkgname}" -t "$pkgdir/usr/share/bash-completion/completions/"
- install -vDm 644 "build/completions/_${pkgname}" -t "$pkgdir/usr/share/zsh/site-functions/"
+ install -vDm 644 completions/$pkgname -t "$pkgdir/usr/share/bash-completion/completions/"
+ install -vDm 644 completions/_$pkgname -t "$pkgdir/usr/share/zsh/site-functions/"
# docs
- install -vDm 644 "docs/${pkgname}.md" -t "${pkgdir}/usr/share/doc/${pkgname}/"
- install -vDm 644 docs/examples/*.{json,yaml} -t "${pkgdir}/usr/share/doc/${pkgname}/examples/"
- install -vDm 644 {{CHANGELOG,CONTRIBUTING,README,code-of-conduct}.md,SECURITY_CONTACTS} -t "${pkgdir}/usr/share/doc/${pkgname}"
+ install -vDm 644 $pkgbase/docs/$pkgname.md -t "$pkgdir/usr/share/doc/$pkgname/"
+ install -vDm 644 $pkgbase/docs/examples/*.{json,yaml} -t "$pkgdir/usr/share/doc/$pkgname/examples/"
+ install -vDm 644 $pkgbase/{{CHANGELOG,CONTRIBUTING,README,code-of-conduct}.md,SECURITY_CONTACTS} -t "$pkgdir/usr/share/doc/$pkgname"
}
package_critest() {
pkgdesc="A benchmarking CLI for CRI-compatible container runtimes"
- cd "$pkgbase"
- install -vDm 755 "build/bin/${pkgname}" -t "${pkgdir}/usr/bin"
+ install -vDm 755 $pkgbase/build/bin/$pkgname -t "$pkgdir/usr/bin/"
# docs
- install -vDm 644 docs/{benchmark,validation}.md -t "${pkgdir}/usr/share/doc/${pkgname}/"
- install -vDm 644 {{CHANGELOG,CONTRIBUTING,README,code-of-conduct}.md,SECURITY_CONTACTS} -t "${pkgdir}/usr/share/doc/${pkgname}"
+ install -vDm 644 $pkgbase/docs/{benchmark,validation}.md -t "$pkgdir/usr/share/doc/$pkgname/"
+ install -vDm 644 $pkgbase/{{CHANGELOG,CONTRIBUTING,README,code-of-conduct}.md,SECURITY_CONTACTS} -t "$pkgdir/usr/share/doc/$pkgname/"
}
More information about the arch-commits
mailing list