# Contributor: Lucas Ramage <ramage.lucas@protonmail.com>
# Maintainer: Lucas Ramage <ramage.lucas@protonmail.com>
pkgname=img
pkgver=0.5.11
pkgrel=27
pkgdesc="Standalone, daemon-less, unprivileged Dockerfile and OCI compatible container image builder"
url="https://github.com/genuinetools/img"
arch="aarch64 x86_64"
license="MIT"
depends="runc shadow-subids"
makedepends="bash go libseccomp-dev"
subpackages="$pkgname-doc"
source="https://github.com/genuinetools/img/archive/v$pkgver/img-$pkgver.tar.gz"
options="!check" # failing tests

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

build() {
	make BUILDTAGS="seccomp noembed"
}

package() {
	install -Dm755 $pkgname -t "$pkgdir"/usr/bin
	install -Dm644 README.md -t "$pkgdir"/usr/share/doc/$pkgname
}

sha512sums="
de80c2c26dd2fb780fb0447f07b5478e1571067ec934fb2adb32dff1aa3853ff872388b9c9c168c139194ab5d38672fb3b4c76c4f77fd8e61ce48bde8cae8c1b  img-0.5.11.tar.gz
"
