mirror of
https://gitdl.cn/https://github.com/chakralinux/lib32.git
synced 2025-01-24 01:42:15 +08:00
66 lines
2.7 KiB
Bash
66 lines
2.7 KiB
Bash
# Maintainer: Neophytos Kolokotronis <tetris4@gmail.com>
|
|
# Contributor: Samsagax <samsagax@gmail.com>
|
|
# Contributor: Thomas Baechler <thomas@archlinux.org>
|
|
# Contributor: James Rayner <iphitus@gmail.com>
|
|
|
|
_pkgbasename=nvidia-utils-bumblebee
|
|
pkgname=lib32-$_pkgbasename
|
|
pkgver=304.37
|
|
pkgrel=1
|
|
pkgdesc="NVIDIA drivers utilities and libraries (32-bit). Repacked and installed in away that won't break LibGL from mesa."
|
|
arch=('x86_64')
|
|
url="http://www.nvidia.com/"
|
|
depends=('lib32-libxvmc' 'lib32-zlib' 'lib32-gcc-libs' $_pkgbasename)
|
|
conflicts=('lib32-nvidia-utils')
|
|
provides=("lib32-nvidia-utils=${pkgver}")
|
|
license=('custom')
|
|
options=('!strip')
|
|
|
|
_filearch='x86'
|
|
_pkg="NVIDIA-Linux-${_filearch}-${pkgver}"
|
|
source=("http://us.download.nvidia.com/XFree86/Linux-${_filearch}/${pkgver}/${_pkg}.run")
|
|
md5sums=('ee3e97109201ab954c96860e28ada611')
|
|
|
|
build() {
|
|
cd "${srcdir}"
|
|
sh ${_pkg}.run --extract-only
|
|
}
|
|
|
|
package() {
|
|
cd "${srcdir}/${_pkg}"
|
|
|
|
# OpenGL library
|
|
install -D -m755 libGL.so.${pkgver} "${pkgdir}/usr/lib32/nvidia-bumblebee/libGL.so.${pkgver}"
|
|
# OpenGL core library
|
|
install -D -m755 libnvidia-glcore.so.${pkgver} "${pkgdir}/usr/lib32/libnvidia-glcore.so.${pkgver}"
|
|
# XvMC
|
|
install -D -m644 libXvMCNVIDIA.a "${pkgdir}/usr/lib32/libXvMCNVIDIA.a"
|
|
install -D -m755 libXvMCNVIDIA.so.${pkgver} "${pkgdir}/usr/lib32/libXvMCNVIDIA.so.${pkgver}"
|
|
# VDPAU
|
|
install -D -m755 libvdpau_nvidia.so.${pkgver} "${pkgdir}/usr/lib32/vdpau/libvdpau_nvidia.so.${pkgver}"
|
|
# CUDA
|
|
install -D -m755 libcuda.so.${pkgver} "${pkgdir}/usr/lib32/libcuda.so.${pkgver}"
|
|
install -D -m755 libnvcuvid.so.${pkgver} "${pkgdir}/usr/lib32/libnvcuvid.so.${pkgver}"
|
|
# nvidia-tls library
|
|
install -D -m755 tls/libnvidia-tls.so.${pkgver} "${pkgdir}/usr/lib32/libnvidia-tls.so.${pkgver}"
|
|
# OpenCL
|
|
install -D -m755 libnvidia-compiler.so.${pkgver} "${pkgdir}/usr/lib32/libnvidia-compiler.so.${pkgver}"
|
|
install -D -m755 libOpenCL.so.1.0.0 "${pkgdir}/usr/lib32/libOpenCL.so.1.0.0"
|
|
|
|
install -D -m755 libnvidia-cfg.so.${pkgver} "${pkgdir}/usr/lib32/libnvidia-cfg.so.${pkgver}"
|
|
install -D -m755 libnvidia-ml.so.${pkgver} "${pkgdir}/usr/lib32/libnvidia-ml.so.${pkgver}"
|
|
|
|
# create soname links
|
|
for _lib in $(find "${pkgdir}" -name '*.so*'); do
|
|
_soname="$(dirname ${_lib})/$(readelf -d "$_lib" | sed -nr 's/.*Library soname: \[(.*)\].*/\1/p')"
|
|
if [ ! -e "${_soname}" ]; then
|
|
ln -s "$(basename ${_lib})" "${_soname}"
|
|
ln -s "$(basename ${_soname})" "${_soname/.[0-9]*/}"
|
|
fi
|
|
done
|
|
|
|
rm -rf "${pkgdir}"/usr/{include,share,bin}
|
|
mkdir -p "${pkgdir}/usr/share/licenses"
|
|
ln -s $_pkgbasename "${pkgdir}/usr/share/licenses/${pkgname}"
|
|
}
|