aboutsummaryrefslogtreecommitdiffstats
path: root/testing/apko/APKBUILD
blob: 9cd521e6a1490298710fa0c9494da96c75131dbd (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
# Maintainer: Ariadne Conill <ariadne@dereferenced.org>
pkgname=apko
pkgver=0.3.2
pkgrel=0
pkgdesc="declarative APK-based container building tool with support for Sigstore signatures"
url="https://github.com/chainguard-dev/apko"
arch="all"
license="Apache-2.0"
# Explicitly depend on apk-tools, so that this package can be used without alpine-base.
depends="apk-tools"
makedepends="go"
subpackages="
	$pkgname-bash-completion
	$pkgname-fish-completion
	$pkgname-zsh-completion
	"
source="https://github.com/chainguard-dev/apko/archive/v$pkgver/apko-$pkgver.tar.gz"

build() {
	mkdir build
	go build -o build/ -tags -tags=pivkey,pkcs11key "$builddir"/...

	for i in bash fish zsh; do
		"$builddir"/build/apko completion $i > "$builddir"/apko.$i
	done
}

check() {
	go test "$builddir"/...
}

package() {
	install -Dm755 "$builddir"/build/apko "$pkgdir"/usr/bin/apko

	install -Dm644 "$builddir"/apko.bash "$pkgdir"/usr/share/bash-completion/completions/apko
	install -Dm644 "$builddir"/apko.fish "$pkgdir"/usr/share/fish/completions/apko.fish
	install -Dm644 "$builddir"/apko.zsh "$pkgdir"/usr/share/zsh/site-functions/_apko
}

sha512sums="
950c73f5beebe991608a5a75fea0dbd85f64b9ae9e9a9e9fd47f65d4d9254da1bb53ec87c425f07bcc59b47b29a8a2f2719d2ecc9708fca14faea51aa19f3be7  apko-0.3.2.tar.gz
"