summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorJerry2019-06-11 16:14:16 +0800
committerJerry2019-06-11 16:14:16 +0800
commited1e910f7903cf2a4301caee0b3d7080db40da84 (patch)
tree3f0574015779e98f887804a4b9b43a3d4d05269a
downloadaur-ed1e910f7903cf2a4301caee0b3d7080db40da84.tar.gz
340.107-3
-rw-r--r--.SRCINFO33
-rw-r--r--PKGBUILD98
2 files changed, 131 insertions, 0 deletions
diff --git a/.SRCINFO b/.SRCINFO
new file mode 100644
index 00000000000..ad670c5e2d6
--- /dev/null
+++ b/.SRCINFO
@@ -0,0 +1,33 @@
+pkgbase = lib32-nvidia-340xx-utils
+ pkgver = 340.107
+ pkgrel = 3
+ url = http://www.nvidia.com/
+ arch = x86_64
+ license = custom
+ options = !strip
+ source = https://us.download.nvidia.com/XFree86/Linux-x86/340.107/NVIDIA-Linux-x86-340.107.run
+ sha512sums = 0add713942bcdb639d19b5c36f5e0cea14f9e07490191d46dfeba0515ede7700fd8e9467ec531d38329fe1e76bf45905e70e0d440e7bc2dc79c1d767eab03338
+
+pkgname = lib32-nvidia-340xx-utils
+ pkgdesc = NVIDIA drivers utilities (32-bit)
+ depends = lib32-zlib
+ depends = lib32-gcc-libs
+ depends = nvidia-340xx-utils
+ optdepends = lib32-opencl-nvidia-340xx
+ provides = lib32-libgl
+ provides = lib32-libegl
+ provides = lib32-libgles
+ provides = lib32-nvidia-340xx-libgl
+ provides = lib32-nvidia-utils
+ conflicts = lib32-nvidia-340xx-libgl
+ conflicts = lib32-nvidia-utils
+ replaces = lib32-nvidia-340xx-libgl
+
+pkgname = lib32-opencl-nvidia-340xx
+ pkgdesc = OpenCL implemention for NVIDIA (32-bit)
+ depends = lib32-zlib
+ depends = lib32-gcc-libs
+ optdepends = opencl-headers: headers necessary for OpenCL development
+ provides = lib32-opencl-driver
+ conflicts = lib32-opencl-nvidia
+
diff --git a/PKGBUILD b/PKGBUILD
new file mode 100644
index 00000000000..74b7c4fe472
--- /dev/null
+++ b/PKGBUILD
@@ -0,0 +1,98 @@
+# Maintainer: Giancarlo Razzolini <grazzolini@archlinux.org>
+# Contributor: Thomas Baechler <thomas@archlinux.org>
+# Contributor: James Rayner <iphitus@gmail.com>
+
+_pkgbasename=nvidia-340xx-utils
+pkgbase=lib32-$_pkgbasename
+pkgname=('lib32-nvidia-340xx-utils' 'lib32-opencl-nvidia-340xx')
+pkgver=340.107
+pkgrel=3
+arch=('x86_64')
+url="http://www.nvidia.com/"
+license=('custom')
+options=('!strip')
+
+_arch='x86'
+_pkg="NVIDIA-Linux-${_arch}-${pkgver}"
+source=("https://us.download.nvidia.com/XFree86/Linux-${_arch}/${pkgver}/${_pkg}.run")
+sha512sums=('0add713942bcdb639d19b5c36f5e0cea14f9e07490191d46dfeba0515ede7700fd8e9467ec531d38329fe1e76bf45905e70e0d440e7bc2dc79c1d767eab03338')
+
+create_links() {
+ # create soname links
+ for _lib in $(find "${pkgdir}" -name '*.so*' | grep -v 'xorg/'); do
+ _soname=$(dirname "${_lib}")/$(readelf -d "${_lib}" | grep -Po 'SONAME.*: \[\K[^]]*' || true)
+ _base=$(echo ${_soname} | sed -r 's/(.*).so.*/\1.so/')
+ [[ -e "${_soname}" ]] || ln -s $(basename "${_lib}") "${_soname}"
+ [[ -e "${_base}" ]] || ln -s $(basename "${_soname}") "${_base}"
+ done
+}
+
+build() {
+ sh ${_pkg}.run --extract-only
+}
+
+package_lib32-opencl-nvidia-340xx() {
+ pkgdesc="OpenCL implemention for NVIDIA (32-bit)"
+ depends=('lib32-zlib' 'lib32-gcc-libs')
+ optdepends=('opencl-headers: headers necessary for OpenCL development')
+ conflicts=('lib32-opencl-nvidia')
+ provides=('lib32-opencl-driver')
+ cd "${_pkg}"
+
+ # OpenCL
+ install -D -m755 "libnvidia-compiler.so.${pkgver}" "${pkgdir}/usr/lib32/libnvidia-compiler.so.${pkgver}"
+ install -D -m755 "libnvidia-opencl.so.${pkgver}" "${pkgdir}/usr/lib32/libnvidia-opencl.so.${pkgver}"
+
+ create_links
+
+ mkdir -p "${pkgdir}/usr/share/licenses"
+ ln -s nvidia "${pkgdir}/usr/share/licenses/lib32-opencl-nvidia"
+}
+
+package_lib32-nvidia-340xx-utils() {
+ pkgdesc="NVIDIA drivers utilities (32-bit)"
+ depends=('lib32-zlib' 'lib32-gcc-libs' 'nvidia-340xx-utils')
+ conflicts=('lib32-nvidia-340xx-libgl' 'lib32-nvidia-utils')
+ provides=('lib32-libgl' 'lib32-libegl' 'lib32-libgles' 'lib32-nvidia-340xx-libgl' 'lib32-nvidia-utils')
+ replaces=('lib32-nvidia-340xx-libgl')
+ optdepends=('lib32-opencl-nvidia-340xx')
+
+ cd "${_pkg}"
+
+ # OpenGL libraries
+ install -D -m755 "libGL.so.${pkgver}" "${pkgdir}/usr/lib32/nvidia/libGL.so.${pkgver}"
+ install -D -m755 "libEGL.so.${pkgver}" "${pkgdir}/usr/lib32/nvidia/libEGL.so.${pkgver}"
+ install -D -m755 "libGLESv1_CM.so.${pkgver}" "${pkgdir}/usr/lib32/nvidia/libGLESv1_CM.so.${pkgver}"
+ install -D -m755 "libGLESv2.so.${pkgver}" "${pkgdir}/usr/lib32/nvidia/libGLESv2.so.${pkgver}"
+
+ # OpenGL core library
+ install -D -m755 "libnvidia-glcore.so.${pkgver}" "${pkgdir}/usr/lib32/nvidia/libnvidia-glcore.so.${pkgver}"
+ install -D -m755 "libnvidia-eglcore.so.${pkgver}" "${pkgdir}/usr/lib32/nvidia/libnvidia-eglcore.so.${pkgver}"
+ install -D -m755 "libnvidia-glsi.so.${pkgver}" "${pkgdir}/usr/lib32/nvidia/libnvidia-glsi.so.${pkgver}"
+
+ # misc
+ install -D -m755 "libnvidia-ifr.so.${pkgver}" "${pkgdir}/usr/lib32/nvidia/libnvidia-ifr.so.${pkgver}"
+ install -D -m755 "libnvidia-fbc.so.${pkgver}" "${pkgdir}/usr/lib32/nvidia/libnvidia-fbc.so.${pkgver}"
+ install -D -m755 "libnvidia-encode.so.${pkgver}" "${pkgdir}/usr/lib32/nvidia/libnvidia-encode.so.${pkgver}"
+ install -D -m755 "libnvidia-cfg.so.${pkgver}" "${pkgdir}/usr/lib32/nvidia/libnvidia-cfg.so.${pkgver}"
+ install -D -m755 "libnvidia-ml.so.${pkgver}" "${pkgdir}/usr/lib32/nvidia/libnvidia-ml.so.${pkgver}"
+
+ # VDPAU
+ install -D -m755 "libvdpau_nvidia.so.${pkgver}" "${pkgdir}/usr/lib32/vdpau/libvdpau_nvidia.so.${pkgver}"
+
+ # nvidia-tls library
+ install -D -m755 "tls/libnvidia-tls.so.${pkgver}" "${pkgdir}/usr/lib32/nvidia/libnvidia-tls.so.${pkgver}"
+
+ # CUDA
+ install -D -m755 "libcuda.so.${pkgver}" "${pkgdir}/usr/lib32/nvidia/libcuda.so.${pkgver}"
+ install -D -m755 "libnvcuvid.so.${pkgver}" "${pkgdir}/usr/lib32/nvidia/libnvcuvid.so.${pkgver}"
+
+ create_links
+
+ install -dm 755 "${pkgdir}"/etc/ld.so.conf.d
+ echo -e '/usr/lib32/nvidia/' > "${pkgdir}"/etc/ld.so.conf.d/00-lib32-nvidia.conf
+
+ rm -rf "${pkgdir}"/usr/{include,share,bin}
+ mkdir -p "${pkgdir}/usr/share/licenses"
+ ln -s nvidia "${pkgdir}/usr/share/licenses/${pkgname}"
+}