Skip to content

Instantly share code, notes, and snippets.

@nlgranger
Created March 3, 2019 19:43
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save nlgranger/7cd7d74c48eced30a3673c68437a39be to your computer and use it in GitHub Desktop.
Save nlgranger/7cd7d74c48eced30a3673c68437a39be to your computer and use it in GitHub Desktop.
PKGBUILD for libnvidia-container
diff --git a/Makefile b/Makefile
index 0af8123..c6dc32c 100644
--- a/Makefile
+++ b/Makefile
@@ -149,6 +149,10 @@ BIN_CFLAGS = -I$(SRCS_DIR) -fPIE -flto $(CFLAGS)
BIN_LDFLAGS = -L. -pie $(LDFLAGS) -Wl,-rpath='$$ORIGIN/../$$LIB'
BIN_LDLIBS = -l:$(LIB_SHARED) -lcap $(LDLIBS)
+ifeq ($(WITH_TIRPC), yes)
+BIN_CPPFLAGS += -isystem $(DEPS_DIR)$(includedir)/tirpc -DWITH_TIRPC
+endif
+
$(word 1,$(LIB_RPC_SRCS)): RPCGENFLAGS=-h
$(word 2,$(LIB_RPC_SRCS)): RPCGENFLAGS=-c
$(word 3,$(LIB_RPC_SRCS)): RPCGENFLAGS=-m
# Maintainer: Nicolas Granger <nicolas.granger.m@gmail.com>
pkgname=libnvidia-container
pkgver=1.0.0
pkgrel=1
pkgdesc="NVIDIA container runtime library"
arch=('x86_64')
url="https://nvidia.github.io/libnvidia-container/"
license=('BSD')
depends=()
makedepends=('bmake' 'rpcsvc-proto')
source=(
"git+https://github.com/NVIDIA/libnvidia-container.git#tag=v${pkgver}"
"fix_flags.patch")
sha256sums=(
'SKIP'
'08d1db2a66939ea233849951eb4d0c4da689818975069b10c7c5af19f73194d5'
)
prepare() {
cd "${srcdir}/${pkgname}"
patch -p1 < ${srcdir}/fix_flags.patch
}
build() {
cd "${srcdir}/${pkgname}"
WITH_TIRPC=yes WITH_SECCOMP=yes WITH_LIBELF=yes make
}
package() {
cd "${srcdir}/${pkgname}"
make prefix=/usr dist
tar -xf dist/${pkgname}_${pkgver}_x86_64.tar.xz -C ${pkgdir} --strip-components=1
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment