diff --git a/common/shlibs b/common/shlibs index b1490c5c753..62ad879f73f 100644 --- a/common/shlibs +++ b/common/shlibs @@ -4165,3 +4165,5 @@ libCore.so root-6.24.06_1 libCore.so qtcreator-7.0.2_1 liblowdown.so lowdown-0.11.2_1 libjaylink.so.0 libjaylink-0.2.0_1 +libnvidia-container.so.1 libnvidia-container-1.10.0_1 +libnvidia-container-go.so.1 libnvidia-container-1.10.0_1 diff --git a/srcpkgs/libnvidia-container-devel b/srcpkgs/libnvidia-container-devel new file mode 120000 index 00000000000..39e6f1942c7 --- /dev/null +++ b/srcpkgs/libnvidia-container-devel @@ -0,0 +1 @@ +libnvidia-container \ No newline at end of file diff --git a/srcpkgs/libnvidia-container/patches/fix_rpc_flags.patch b/srcpkgs/libnvidia-container/patches/fix_rpc_flags.patch new file mode 100644 index 00000000000..2ff327e4612 --- /dev/null +++ b/srcpkgs/libnvidia-container/patches/fix_rpc_flags.patch @@ -0,0 +1,12 @@ +--- a/Makefile 2021-11-23 10:58:59.234599602 -0800 ++++ b/Makefile 2021-11-23 11:00:02.476171671 -0800 +@@ -126,7 +126,8 @@ + -Wall -Wextra -Wcast-align -Wpointer-arith -Wmissing-prototypes -Wnonnull \ + -Wwrite-strings -Wlogical-op -Wformat=2 -Wmissing-format-attribute -Winit-self -Wshadow \ + -Wstrict-prototypes -Wunreachable-code -Wconversion -Wsign-conversion \ +- -Wno-unknown-warning-option -Wno-format-extra-args -Wno-gnu-alignof-expression $(CFLAGS) ++ -Wno-unknown-warning-option -Wno-format-extra-args -Wno-gnu-alignof-expression \ ++ -I/usr/include/tirpc -ltirpc $(CFLAGS) + LDFLAGS := -Wl,-zrelro -Wl,-znow -Wl,-zdefs -Wl,--gc-sections $(LDFLAGS) + LDLIBS := $(LDLIBS) + diff --git a/srcpkgs/libnvidia-container/template b/srcpkgs/libnvidia-container/template new file mode 100644 index 00000000000..29cca16981f --- /dev/null +++ b/srcpkgs/libnvidia-container/template @@ -0,0 +1,43 @@ +# Template file for 'libnvidia-container' +pkgname=libnvidia-container +version=1.10.0 +revision=1 +archs="x86_64" +hostmakedepends="tar xz curl bmake groff m4 pkg-config which go" +makedepends="rpcsvc-proto libcap-devel libseccomp-devel libtirpc-devel" +short_desc="NVIDIA container runtime library" +maintainer="Quentin Freimanis " +license="Apache-2.0" +homepage="https://github.com/NVIDIA/libnvidia-container" +distfiles="https://github.com/NVIDIA/libnvidia-container/archive/v${version}.tar.gz" +checksum=418bdfa14d6339e21a401b945967945ff0b1e99a319783f84ee59a032ff7759d + +do_build() { + make dist prefix=/usr REVISION=${version} +} + +pre_install() { + cd dist + tar xvf ${pkgname}_${version}_${archs}.tar.xz +} + +do_install() { + vinstall dist/${pkgname}_${version}/usr/lib/${pkgname}.so.${version} 755 /usr/lib/ + vinstall dist/${pkgname}_${version}/usr/lib/${pkgname}-go.so.${version} 755 /usr/lib/ + ln -s /usr/lib/${pkgname}.so.${version} ${DESTDIR}/usr/lib/${pkgname}.so.${version%%.*} + ln -s /usr/lib/${pkgname}-go.so.${version} ${DESTDIR}/usr/lib/${pkgname}-go.so.${version%%.*} + + vbin dist/${pkgname}_${version}/usr/bin/nvidia-container-cli +} + +libnvidia-container-devel_package() { + short_desc+=" - development files" + depends="${sourcepkg}>=${version}_${revision}" + pkg_install() { + vinstall dist/${sourcepkg}_${version}/usr/lib/${sourcepkg}.a 644 /usr/lib/ + ln -s /usr/lib/${pkgname}.so.${version} ${PKGDESTDIR}/usr/lib/${pkgname}.so + ln -s /usr/lib/${pkgname}-go.so.${version} ${PKGDESTDIR}/usr/lib/${pkgname}-go.so + vinstall dist/${sourcepkg}_${version}/usr/include/nvc.h 644 /usr/include/ + vinstall dist/${sourcepkg}_${version}/usr/lib/pkgconfig/${sourcepkg}.pc 644 /usr/lib/pkgconfig/ + } +}