lib32/lib32-nvidia-utils/PKGBUILD

63 lines
2.3 KiB
Bash
Raw Normal View History

2011-01-16 19:44:51 +08:00
# Lib32 Packages for Chakra, part of chakra-project.org
#
# maintainer (x86_64): Giuseppe Calà <jiveaxe@gmail.com>
# maintainer (x86_64): Anke Boersma <abveritas[at]chakra-project[dot]org>
_pkgbasename=nvidia-utils
pkgname=lib32-$_pkgbasename
pkgver=310.19
2011-01-16 19:44:51 +08:00
pkgrel=1
pkgdesc="NVIDIA drivers utilities and libraries. (32-bit)"
arch=('x86_64')
url="http://www.nvidia.com/"
depends=('lib32-libxvmc' 'lib32-zlib' 'lib32-gcc-libs' $_pkgbasename=$pkgver)
2011-01-16 19:44:51 +08:00
conflicts=('lib32-libgl')
provides=('lib32-libgl=7.11')
2011-01-16 19:44:51 +08:00
license=('custom')
options=('!strip')
_filearch='x86'
_pkg="NVIDIA-Linux-${_filearch}-${pkgver}"
source=("http://us.download.nvidia.com/XFree86/Linux-${_filearch}/${pkgver}/${_pkg}.run")
md5sums=('2adbdd38540b3a8955714760e05f575d')
2011-01-16 19:44:51 +08:00
build() {
cd $srcdir
sh ${_pkg}.run --extract-only
2011-01-16 19:44:51 +08:00
}
package() {
cd $srcdir/${_pkg}
2011-01-16 19:44:51 +08:00
# OpenGL library
install -D -m755 libGL.so.$pkgver $pkgdir/usr/lib32/libGL.so.$pkgver
# OpenGL core library
install -D -m755 libnvidia-glcore.so.$pkgver $pkgdir/usr/lib32/libnvidia-glcore.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
2011-01-16 19:44:51 +08:00
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
2011-05-02 19:51:20 +08:00
# 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
2011-01-16 19:44:51 +08:00
rm -rf "${pkgdir}"/usr/{include,share,bin}
mkdir -p "$pkgdir/usr/share/licenses"
ln -s $_pkgbasename "$pkgdir/usr/share/licenses/$pkgname"
2011-01-16 19:44:51 +08:00
}