diff options
author | Julie Shapiro | 2021-12-14 11:40:36 -0600 |
---|---|---|
committer | Julie Shapiro | 2021-12-14 11:40:36 -0600 |
commit | d0a4cbcc9b16ff74cddb584812d16c1d1f9400d8 (patch) | |
tree | 31d882307d054eb0771b8d13d2950c696d93750e | |
parent | 653f76f77898d297ea68858c608a2841dbf101d4 (diff) | |
download | aur-d0a4cbcc9b16ff74cddb584812d16c1d1f9400d8.tar.gz |
move repo over to toolkit
-rw-r--r-- | .SRCINFO | 12 | ||||
-rw-r--r-- | PKGBUILD | 57 |
2 files changed, 41 insertions, 28 deletions
@@ -1,14 +1,14 @@ pkgbase = nvidia-container-runtime pkgdesc = NVIDIA opencontainer runtime fork to expose GPU devices to containers. - pkgver = 3.5.0 - pkgrel = 2 - url = https://github.com/NVIDIA/nvidia-container-runtime + pkgver = 3.7.0 + pkgrel = 1 + url = https://github.com/NVIDIA/nvidia-container-toolkit arch = x86_64 license = APACHE makedepends = go depends = libseccomp - depends = nvidia-container-toolkit>=1.5.0 - source = https://github.com/NVIDIA/nvidia-container-runtime/archive/v3.5.0.tar.gz - sha256sums = 4985efe4488e441d0e4910cc7eb2046176db063e5bbe2e0542a7c08d5c5e7d34 + depends = nvidia-container-toolkit>=1.7.0 + source = v3.7.0-1.tar.gz::https://github.com/NVIDIA/nvidia-container-toolkit/archive/v1.7.0.tar.gz + sha256sums = f096b2db7cc837164e9739fc31680ff7c1f4135e6b7290dc68f590df3c651a02 pkgname = nvidia-container-runtime @@ -3,39 +3,52 @@ pkgname=nvidia-container-runtime -pkgver=3.5.0 -pkgrel=2 +# Author's note +# I am so mad that this cannot be a split package with nvidia-container-toolkit +# due to it needing a different pkgver. That said, now that the code for this +# runtime has been moved into the toolkit repo, this file is basically +# identical to nvidia-container-toolkit's PKGBUILD. + +pkgver=3.7.0 +pkgrel=1 + +toolkit_ver=1.7.0 pkgdesc='NVIDIA opencontainer runtime fork to expose GPU devices to containers.' arch=('x86_64') -url='https://github.com/NVIDIA/nvidia-container-runtime' +# see note above. +url='https://github.com/NVIDIA/nvidia-container-toolkit' license=('APACHE') makedepends=('go') -depends=('libseccomp' 'nvidia-container-toolkit>=1.5.0') +depends=('libseccomp' 'nvidia-container-toolkit>=1.7.0') -source=("https://github.com/NVIDIA/${pkgname}/archive/v${pkgver}.tar.gz") -sha256sums=('4985efe4488e441d0e4910cc7eb2046176db063e5bbe2e0542a7c08d5c5e7d34') +source=("v${pkgver}-${pkgrel}.tar.gz"::"${url}/archive/v${toolkit_ver}.tar.gz") +sha256sums=('f096b2db7cc837164e9739fc31680ff7c1f4135e6b7290dc68f590df3c651a02') -_srcdir="${pkgname}-${pkgver}" - -prepare() { - mkdir -p gopath/src - ln -rTsf "${_srcdir}/src" "gopath/src/${pkgname}" -} +_srcdir="nvidia-container-toolkit-${toolkit_ver}" build() { cd "${_srcdir}" - pwd - make build - #go build \ - # -buildmode=pie \ - # -gcflags "all=-trimpath=${PWD}" \ - # -asmflags "all=-trimpath=${PWD}" \ - # -ldflags "-extldflags ${LDFLAGS}" + + mkdir bin + + GOPATH="${srcdir}/gopath" \ + go build -v \ + -buildmode=pie \ + -gcflags "all=-trimpath=${PWD}" \ + -asmflags "all=-trimpath=${PWD}" \ + -ldflags "-s -w -extldflags ${LDFLAGS}" \ + -o bin \ + "./..." + # -trimpath \ # only go > 1.13 + + # go leaves a bunch of local stuff with 0400, making it break future `makepkg -C` _grumble grumble_ + GOPATH="${srcdir}/gopath" \ + go clean -modcache } -package() { - install -D -m755 "${srcdir}/${_srcdir}/nvidia-container-runtime" "${pkgdir}/usr/bin/nvidia-container-runtime" - install -D -m644 "${srcdir}/${_srcdir}/LICENSE" "${pkgdir}/usr/share/licenses/${pkgname}/LICENSE" +package_nvidia-container-runtime() { + install -D -m755 "${_srcdir}/bin/${pkgname}" "${pkgdir}/usr/bin/${pkgname}" + install -D -m644 "${_srcdir}/LICENSE" "${pkgdir}/usr/share/licenses/$pkgname/LICENSE" } |