2022-03-28 06:43:03 +02:00
|
|
|
# Maintainer: Manuel Hüsers <aur@huesers.de>
|
|
|
|
# Contributor: Vincent Kobel (v@kobl.one)
|
2018-05-03 17:02:03 +02:00
|
|
|
|
2022-03-28 06:43:03 +02:00
|
|
|
pkgname='gvisor-git'
|
|
|
|
_pkgbin='runsc'
|
|
|
|
_pkgshim='containerd-shim-runsc-v1'
|
2024-05-07 19:41:09 +02:00
|
|
|
pkgver=20240501.0
|
2018-05-08 09:21:30 +02:00
|
|
|
pkgrel=1
|
2022-03-28 06:43:03 +02:00
|
|
|
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')
|
2018-05-03 17:02:03 +02:00
|
|
|
|
2018-05-05 11:32:57 +02:00
|
|
|
pkgver() {
|
2022-03-28 06:43:03 +02:00
|
|
|
cd "${pkgname%-git}"
|
|
|
|
git describe --long --tags | sed 's/\([^-]*-g\)/r\1/;s/release-//g;s/-/./g'
|
2018-05-05 11:32:57 +02:00
|
|
|
}
|
|
|
|
|
2018-05-03 17:02:03 +02:00
|
|
|
build() {
|
2022-03-28 06:43:03 +02:00
|
|
|
cd "${pkgname%-git}"
|
|
|
|
export CGO_CPPFLAGS="${CPPFLAGS}"
|
|
|
|
export CGO_CFLAGS="${CFLAGS}"
|
|
|
|
export CGO_CXXFLAGS="${CXXFLAGS}"
|
|
|
|
export CGO_LDFLAGS="${LDFLAGS}"
|
2023-08-05 15:15:29 +02:00
|
|
|
export GOPATH="${srcdir}"
|
2022-03-28 06:43:03 +02:00
|
|
|
export GOFLAGS="-buildmode=pie -trimpath -mod=readonly -modcacherw"
|
2024-03-07 06:53:26 +01:00
|
|
|
go build -v -o "bin/$_pkgbin" -ldflags "-linkmode=external -compressdwarf=false -X gvisor.dev/gvisor/runsc/version.version=${pkgver}" gvisor.dev/gvisor/runsc
|
2023-08-05 15:15:29 +02:00
|
|
|
go build -v -o "bin/$_pkgshim" -ldflags "-linkmode=external -compressdwarf=false" gvisor.dev/gvisor/shim
|
2018-05-03 17:02:03 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
package() {
|
2022-03-28 06:43:03 +02:00
|
|
|
cd "${pkgname%-git}"
|
2022-03-28 21:12:05 +02:00
|
|
|
install -Dm 755 "bin/$_pkgbin" "$pkgdir/usr/bin/$_pkgbin"
|
|
|
|
install -Dm 755 "bin/$_pkgshim" "$pkgdir/usr/bin/$_pkgshim"
|
2018-05-03 17:02:03 +02:00
|
|
|
}
|