blob: 65d852fbb6588014283638d0808cfd80e26fc286 (
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
|
# Maintainer: ml <ml@visu.li>
_bin=kubectl-unused_volumes
pkgname=${_bin/_/-}
pkgver=0.1.2
pkgrel=3
pkgdesc='Clean up Kuberntes yaml and json output to make it readable'
arch=('x86_64' 'i686')
url='https://github.com/dirathea/kubectl-unused-volumes'
license=('Apache')
depends=('kubectl')
makedepends=('go')
groups=('kubectl-plugins')
source=("${url}/archive/v${pkgver}/${pkgname}-${pkgver}.tar.gz")
sha256sums=('4743b53246ed24593a522c7d45710ff7e2808ee7eed87b69e9b5ea406844fbdb')
build() {
cd "${pkgname}-${pkgver}"
export CGO_ENABLED=1
export CGO_LDFLAGS="$LDFLAGS"
export CGO_CFLAGS="$CFLAGS"
export CGO_CPPFLAGS="$CPPFLAGS"
export CGO_CXXFLAGS="$CXXFLAGS"
export GOFLAGS='-buildmode=pie -modcacherw -trimpath'
go build -ldflags "-linkmode=external" ./cmd/plugin
}
check() {
cd "${pkgname}-${pkgver}"
go test -short ./...
}
package() {
cd "${pkgname}-${pkgver}"
install -Dm755 plugin -t "${pkgdir}/usr/bin/$_bin"
install -Dm644 doc/USAGE.md -t "${pkgdir}/usr/share/doc/${pkgname}"
}
|