Add 'gvisor-git/' from commit 'a6279bbc52726eb5e2fc07e23e2cc62f03b88b31'

git-subtree-dir: gvisor-git
git-subtree-mainline: 198d3e0495
git-subtree-split: a6279bbc52
This commit is contained in:
Manuel 2022-10-18 00:00:01 +02:00
commit ac50cd8280
2 changed files with 62 additions and 0 deletions

17
gvisor-git/.SRCINFO Normal file
View file

@ -0,0 +1,17 @@
pkgbase = gvisor-git
pkgdesc = OCI container sandbox runtime focused on security, efficiency, and ease of use
pkgver = 20220905.0
pkgrel = 1
url = https://gvisor.dev
arch = x86_64
arch = aarch64
license = Apache
makedepends = git
makedepends = go
optdepends = docker: for Docker runtime support
provides = gvisor
conflicts = gvisor
source = git+https://github.com/google/gvisor#branch=go
sha512sums = SKIP
pkgname = gvisor-git

45
gvisor-git/PKGBUILD Normal file
View file

@ -0,0 +1,45 @@
# Maintainer: Manuel Hüsers <aur@huesers.de>
# Contributor: Vincent Kobel (v@kobl.one)
pkgname='gvisor-git'
_pkgbin='runsc'
_pkgshim='containerd-shim-runsc-v1'
pkgver=20220905.0
pkgrel=1
pkgdesc='OCI container sandbox runtime focused on security, efficiency, and ease of use'
arch=('x86_64' 'aarch64')
url='https://gvisor.dev'
license=('Apache')
makedepends=('git' 'go')
optdepends=('docker: for Docker runtime support')
provides=(
"${pkgname%-git}"
)
conflicts=(
"${pkgname%-git}"
)
source=("git+https://github.com/google/${pkgname%-git}#branch=go")
sha512sums=('SKIP')
pkgver() {
cd "${pkgname%-git}"
git describe --long --tags | sed 's/\([^-]*-g\)/r\1/;s/release-//g;s/-/./g'
}
build() {
cd "${pkgname%-git}"
export CGO_CPPFLAGS="${CPPFLAGS}"
export CGO_CFLAGS="${CFLAGS}"
export CGO_CXXFLAGS="${CXXFLAGS}"
export CGO_LDFLAGS="${LDFLAGS}"
export GO111MODULE=on
export GOFLAGS="-buildmode=pie -trimpath -mod=readonly -modcacherw"
CGO_ENABLED=0 go build -v -o "bin/$_pkgbin" -ldflags "-X main.version=${pkgver}" gvisor.dev/gvisor/runsc
go build -v -o "bin/$_pkgshim" gvisor.dev/gvisor/shim
}
package() {
cd "${pkgname%-git}"
install -Dm 755 "bin/$_pkgbin" "$pkgdir/usr/bin/$_pkgbin"
install -Dm 755 "bin/$_pkgshim" "$pkgdir/usr/bin/$_pkgshim"
}