# Maintainer: Hoang Nguyen pkgname=rootlesskit pkgver=1.1.0 pkgrel=4 pkgdesc="Linux-native fake root for implementing rootless containers" url="https://github.com/rootless-containers/rootlesskit" arch="all" license="Apache-2.0" depends="shadow-subids iproute2-minimal" makedepends="go" subpackages=" $pkgname-docker-proxy:_docker_proxy $pkgname-doc " source="$pkgname-$pkgver.tar.gz::https://github.com/rootless-containers/rootlesskit/archive/refs/tags/v$pkgver.tar.gz" options="net" # fetch dependencies export GOCACHE="${GOCACHE:-"$srcdir/go-cache"}" export GOTMPDIR="${GOTMPDIR:-"$srcdir"}" export GOMODCACHE="${GOMODCACHE:-"$srcdir/go"}" build() { mkdir -v build go build -v \ -ldflags "-X github.com/rooless-containers/rootlesskit/pkg/version.Version=$pkgver" \ -o build ./cmd/... } check() { # fork/exec /proc/self/exe: operation not permitted go test $(go list ./... | grep -v pkg/port/builtin) } package() { install -Dm755 build/rootlesskit -t "$pkgdir"/usr/bin install -Dm755 build/rootlessctl -t "$pkgdir"/usr/bin install -Dm644 docs/*.md -t "$pkgdir"/usr/share/doc/$pkgname } _docker_proxy() { pkgdesc="$pkgdesc - Docker proxy" install_if="$pkgname=$pkgver-r$pkgrel docker-engine" install -Dm755 "$builddir"/build/rootlesskit-docker-proxy -t "$subpkgdir"/usr/bin } sha512sums=" e9ac0211a93806a85943c8a30b3fae07cc3cca69608da50db8ac3da4b5d209f4c1eea00eb12cb21fe59e74e41c70ca6cdd89042711235b3e30c3db282aea8f9e rootlesskit-1.1.0.tar.gz "