blob: 39c363094431b11d245bef67e550cea49fe9fb85 (
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
50
51
52
53
54
|
# Contributor: TBK <alpine@jjtc.eu>
# Maintainer: TBK <alpine@jjtc.eu>
pkgname=kompose
pkgver=1.21.0
pkgrel=0
pkgdesc="Tool to move from docker-compose to Kubernetes"
url="https://kompose.io/"
arch="all"
license="Apache-2.0"
options="!check" # Require access to /tmp + bash, jq, ncurses
makedepends="go"
subpackages="$pkgname-bash-completion:bashcomp:noarch $pkgname-zsh-completion:zshcomp:noarch"
source="$pkgname-$pkgver.tar.gz::https://github.com/kubernetes/kompose/archive/v$pkgver.tar.gz"
builddir="$srcdir/src/github.com/kubernetes/$pkgname"
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
}
package() {
install -Dm755 $pkgname "$pkgdir/usr/bin"
mkdir -p "$pkgdir"/usr/share/bash-completion/completions \
"$pkgdir"/usr/share/zsh/site-functions
# Generate completion scripts
./kompose completion bash > "$pkgdir"/usr/share/bash-completion/completions/$pkgname
./kompose completion zsh > "$pkgdir"/usr/share/zsh/site-functions/_$pkgname
}
bashcomp() {
pkgdesc="Bash completion for Kompose"
depends=""
install_if="bash-completion $pkgname-cli=$pkgver-r$pkgrel"
mkdir -p "$subpkgdir"/usr/share/
mv "$pkgdir"/usr/share/bash-completion "$subpkgdir"/usr/share
}
zshcomp() {
pkgdesc="Zsh completion for Kompose"
depends=""
install_if="zsh $pkgname-cli=$pkgver-r$pkgrel"
mkdir -p "$subpkgdir"/usr/share/
mv "$pkgdir"/usr/share/zsh "$subpkgdir"/usr/share
}
sha512sums="96a6a6335d1846c945410b9a7c2e580f736ac2f9730a68f59cdce8f699a7e83910ba21116de8a9640d550c03c7156d684457421597d0d9bcd63067e6cbb03e81 kompose-1.21.0.tar.gz"
|