summaryrefslogtreecommitdiff
path: root/testing/undock/APKBUILD
blob: 2114b8ece148b4f19bd75c7dcf97026b7c579804 (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
# Maintainer: Hoang Nguyen <folliekazetani@protonmail.com>
pkgname=undock
pkgver=0.4.0
pkgrel=3
pkgdesc="Tool to extract contents of a container image into a local folder"
url="https://crazymax.dev/undock/"
arch="all"
license="MIT"
makedepends="go linux-headers gpgme-dev btrfs-progs-dev lvm2-dev"
source="$pkgname-$pkgver.tar.gz::https://github.com/crazy-max/undock/archive/refs/tags/v$pkgver.tar.gz"

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

build() {
	export _gotags="containers_image_openpgp exclude_graphdriver_btrfs exclude_graphdriver_devicemapper"
	go build -v -o bin/$pkgname \
		-ldflags "-X main.version=$pkgver" \
		-tags "$_gotags" \
		./cmd
}

check() {
	go test -tags "$_gotags" ./...
}

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

sha512sums="
2ed7d136b808b1eeda67adaca189c33824627db2f49334b9a6b75ffdfbbe24dabb2bc1deb3aa77105b185ff85a80e0f1393f9bec604d31b66dfd5d4f9c168b6a  undock-0.4.0.tar.gz
"