summaryrefslogtreecommitdiff
path: root/testing/kompose/APKBUILD
blob: 409cc99c29639f1d22ccabf94bc34fa81ae9bfdc (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
37
38
39
40
41
42
43
44
45
46
47
48
49
# Contributor: TBK <alpine@jjtc.eu>
# Maintainer: TBK <alpine@jjtc.eu>
pkgname=kompose
pkgver=1.26.1
pkgrel=9
pkgdesc="Tool to move from docker-compose to Kubernetes"
url="https://kompose.io/"
license="Apache-2.0"
arch="all"
options="chmod-clean !check" # Require access to /tmp + bash, jq, ncurses
makedepends="go"
subpackages="
	$pkgname-bash-completion
	$pkgname-zsh-completion
	$pkgname-fish-completion
	"
source="$pkgname-$pkgver.tar.gz::https://github.com/kubernetes/kompose/archive/v$pkgver.tar.gz"
builddir="$srcdir/src/github.com/kubernetes/$pkgname"

export GOCACHE="${GOCACHE:-"$srcdir/go-cache"}"
export GOTMPDIR="${GOTMPDIR:-"$srcdir"}"
export GOMODCACHE="${GOMODCACHE:-"$srcdir/go"}"

prepare() {
	mkdir -p "$srcdir/src/github.com/kubernetes/"
	ln -sf "$srcdir/$pkgname-$pkgver" "$srcdir/src/github.com/kubernetes/$pkgname"
	default_prepare
}

build() {
	GOPATH="$srcdir" make

	# Generate completion scripts
	./kompose completion bash > completion.bash
	./kompose completion zsh > completion.zsh
	./kompose completion fish > completion.fish
}

package() {
	install -Dm755 $pkgname "$pkgdir"/usr/bin/$pkgname

	install -Dm644 completion.bash "$pkgdir"/usr/share/bash-completion/completions/$pkgname
	install -Dm644 completion.zsh "$pkgdir"/usr/share/zsh/site-functions/_$pkgname
	install -Dm644 completion.fish "$pkgdir"/usr/share/fish/completions/$pkgname.fish
}

sha512sums="
d9d181b12908298c11d99b9dda6f5e48b0bf44fca84836a7397bc726746f8d1a615a7b26aa90ea64a0fd90c50ddceae6c325d0c9d8c0c14840fc5828cefe8c23  kompose-1.26.1.tar.gz
"