Commit 19a27d4d authored by abveritas's avatar abveritas

nvidia-lts update, adding nvidia-304xx, rebuild nvidia for correct warning

parent aa724424
Section "Device"
Identifier "Default nvidia Device"
Driver "nvidia"
Option "NoLogo" "True"
EndSection
#
# Chakra Packages for Chakra, part of chakra-project.org
#
# maintainer abveritas@chakra-project.org
pkgbase=nvidia-304xx-utils
pkgname=('nvidia-304xx-utils' 'nvidia-304xx-settings')
# Edit chakra-hardware-detection/hooks/hwdetect_7_graphics on version jump from 3xx.xx
pkgver=304.51
pkgrel=1
arch=('x86_64')
url="http://www.nvidia.com/"
license=('custom')
options=('!strip')
[ "$CARCH" = "x86_64" ] && {
ARCH='x86_64'
_pkg="NVIDIA-Linux-${ARCH}-${pkgver}-no-compat32"
md5sums=('2ca10e05cd3b5d2a87caaaad9fd93c06')
}
source=("ftp://download.nvidia.com/XFree86/Linux-${ARCH}/${pkgver}/${_pkg}.run"
'nvidia-restore-settings.desktop')
md5sums=("${md5sums[@]}"
'9237516792da7b6df32f8c7e8a98f475')
create_links() {
# create soname links
while read -d '' _lib; do
_soname="$(dirname "${_lib}")/$(readelf -d "${_lib}" | sed -nr 's/.*Library soname: \[(.*)\].*/\1/p')"
[ -e "${_soname}" ] || ln -s "$(basename "${_lib}")" "${_soname}"
[ -e "${_soname/.[0-9]*/}" ] || ln -s "$(basename "${_soname}")" "${_soname/.[0-9]*/}"
done < <(find "${pkgdir}" -type f -name '*.so*' -print0)
}
build() {
cd "${srcdir}"
sh "${_pkg}.run" --extract-only
}
package_nvidia-304xx-utils() {
pkgdesc="NVIDIA drivers utilities and libraries."
depends=('xorg-server' 'libxvmc')
optdepends=('gtk2: nvidia-settings' 'pkg-config: nvidia-xconfig'
'opencl-nvidia: OpenCL support'
'nvidia-settings: Gtk GUI')
conflicts=('libgl' 'nvidia-utils')
provides=('libgl')
cd "${srcdir}/${_pkg}"
# X driver
install -D -m755 nvidia_drv.so "${pkgdir}/usr/lib/xorg/modules/drivers/nvidia_drv.so"
# GLX extension module for X
install -D -m755 "libglx.so.${pkgver}" "${pkgdir}/usr/lib/xorg/modules/extensions/libglx.so.${pkgver}"
ln -s "libglx.so.${pkgver}" "${pkgdir}/usr/lib/xorg/modules/extensions/libglx.so" # X doesn't find glx otherwise
# OpenGL library
install -D -m755 "libGL.so.${pkgver}" "${pkgdir}/usr/lib/libGL.so.${pkgver}"
# OpenGL core library
install -D -m755 "libnvidia-glcore.so.${pkgver}" "${pkgdir}/usr/lib/libnvidia-glcore.so.${pkgver}"
# XvMC
install -D -m644 libXvMCNVIDIA.a "${pkgdir}/usr/lib/libXvMCNVIDIA.a"
install -D -m755 "libXvMCNVIDIA.so.${pkgver}" "${pkgdir}/usr/lib/libXvMCNVIDIA.so.${pkgver}"
# VDPAU
install -D -m755 "libvdpau_nvidia.so.${pkgver}" "${pkgdir}/usr/lib/vdpau/libvdpau_nvidia.so.${pkgver}"
# nvidia-tls library
install -D -m755 "tls/libnvidia-tls.so.${pkgver}" "${pkgdir}/usr/lib/libnvidia-tls.so.${pkgver}"
install -D -m755 "libnvidia-cfg.so.${pkgver}" "${pkgdir}/usr/lib/libnvidia-cfg.so.${pkgver}"
install -D -m755 "libnvidia-ml.so.${pkgver}" "${pkgdir}/usr/lib/libnvidia-ml.so.${pkgver}"
# CUDA
install -D -m755 "libcuda.so.${pkgver}" "${pkgdir}/usr/lib/libcuda.so.${pkgver}"
install -D -m755 "libnvcuvid.so.${pkgver}" "${pkgdir}/usr/lib/libnvcuvid.so.${pkgver}"
# nvidia-xconfig
install -D -m755 nvidia-xconfig "${pkgdir}/usr/bin/nvidia-xconfig"
install -D -m644 nvidia-xconfig.1.gz "${pkgdir}/usr/share/man/man1/nvidia-xconfig.1.gz"
# nvidia-bug-report
install -D -m755 nvidia-bug-report.sh "${pkgdir}/usr/bin/nvidia-bug-report.sh"
# nvidia-smi
install -D -m755 nvidia-smi "${pkgdir}/usr/bin/nvidia-smi"
install -D -m644 nvidia-smi.1.gz "${pkgdir}/usr/share/man/man1/nvidia-smi.1.gz"
install -D -m644 LICENSE "${pkgdir}/usr/share/licenses/nvidia/LICENSE"
ln -s nvidia "${pkgdir}/usr/share/licenses/nvidia-utils"
install -D -m644 README.txt "${pkgdir}/usr/share/doc/nvidia/README"
install -D -m644 NVIDIA_Changelog "${pkgdir}/usr/share/doc/nvidia/NVIDIA_Changelog"
ln -s nvidia "${pkgdir}/usr/share/doc/nvidia-utils"
create_links
}
package_nvidia-304xx-settings() {
pkgdesc="Gtk Graphical User Interface for nVidia"
depends=('nvidia-utils' 'gtk2')
conflicts=('nvidia-settings')
cd "${srcdir}/${_pkg}"
install -D -m755 nvidia-settings "${pkgdir}/usr/bin/nvidia-settings"
install -D -m644 nvidia-settings.1.gz "${pkgdir}/usr/share/man/man1/nvidia-settings.1.gz"
install -D -m644 nvidia-settings.desktop "${pkgdir}/usr/share/applications/nvidia-settings.desktop"
install -D -m644 nvidia-settings.png "${pkgdir}/usr/share/pixmaps/nvidia-settings.png"
sed -e 's:__UTILS_PATH__:/usr/bin:' -e 's:__PIXMAP_PATH__:/usr/share/pixmaps:' -i "${pkgdir}/usr/share/applications/nvidia-settings.desktop"
# Install the autostart .desktop file, so that parameters saved through nvidia-settings
# are automatically reloaded at each login
install -D -m644 "${srcdir}/nvidia-restore-settings.desktop" "${pkgdir}/usr/share/autostart/nvidia-restore-settings.desktop"
}
# vim:set ts=2 sw=2 et:
[Desktop Entry]
Exec=nvidia-settings --load-config-only
TryExec=/usr/bin/nvidia-settings
Name=Restore the video card and monitor parameters previously set in NVIDIA Settings
Name[it]=Ripristina i parametri di scheda video e monitor precedentemente salvati in NVIDIA Settings
Type=Service
X-DBUS-StartupType=none
X-KDE-autostart-phase=1
X-KDE-StartupNotify=false
post_install() {
echo 'By using this package you accept the NVIDIA license,'
echo 'which has been installed in /usr/share/licenses/nvidia/LICENSE'
echo 'If you do not accept this license, you must remove the package immediately.'
}
#
# Chakra Packages for Chakra, part of chakra-project.org
#
# maintainer abveritas@chakra-project.org
_extramodules=extramodules-3.6-CHAKRA
_kver="$(cat /lib/modules/${_extramodules}/version)"
pkgname=('nvidia-304xx' 'chd-nvidia-304xx')
pkgver=304.51
pkgrel=1
arch=('x86_64')
url="http://www.nvidia.com/"
makedepends=('linux-headers' 'linux>=3.6' 'linux<3.7' "nvidia-304xx-utils=${pkgver}")
license=('custom')
source=("https://gitorious.org/chakra/chakra-hardware-detection/blobs/raw/master/hwdb/nvidia_supported")
md5sums=('62d0cdb856cfae64753c0f3acf729d47')
_ARCH='x86_64'
_pkg="NVIDIA-Linux-${_ARCH}-${pkgver}-no-compat32"
source+=("ftp://download.nvidia.com/XFree86/Linux-${_ARCH}/${pkgver}/${_pkg}.run")
md5sums+=('2ca10e05cd3b5d2a87caaaad9fd93c06')
build() {
cd "${srcdir}"
sh "${_pkg}.run" --extract-only
cd "${_pkg}/kernel"
make SYSSRC=/lib/modules/"${_kver}/build" module
}
package_nvidia-304xx() {
pkgdesc="NVIDIA drivers for linux."
depends=('linux>=3.6' 'linux<3.7' "nvidia-304xx-utils=${pkgver}")
conflicts=('nvidia-96xx' 'nvidia-173xx' 'nvidia')
install=nvidia.install
install -D -m644 "${srcdir}/${_pkg}/kernel/nvidia.ko" \
"${pkgdir}/lib/modules/${_extramodules}/nvidia.ko"
install -d -m755 "${pkgdir}/etc/modprobe.d"
echo "blacklist nouveau" >> "${pkgdir}/etc/modprobe.d/nouveau_blacklist.conf"
sed -i -e "s/EXTRAMODULES='.*'/EXTRAMODULES='${_extramodules}'/" "${startdir}/nvidia.install"
gzip "${pkgdir}/lib/modules/${_extramodules}/nvidia.ko"
}
package_chd-nvidia-304xx() {
pkgdesc="CHD ids for nvidia $pkgver"
arch=('any')
cd "${srcdir}/${_pkg}"
install -dm755 "${pkgdir}/opt/chakra/hwdb"
sh -e "${srcdir}/nvidia_supported" README.txt kernel/nv-kernel.o \
> "${pkgdir}/opt/chakra/hwdb/hw_nvidia_hwdb"
}
post_install() {
EXTRAMODULES='extramodules-3.6-CHAKRA'
depmod $(cat /lib/modules/$EXTRAMODULES/version)
echo 'In order to use nvidia module, reboot the system.'
}
post_upgrade() {
EXTRAMODULES='extramodules-3.6-CHAKRA'
depmod $(cat /lib/modules/$EXTRAMODULES/version)
}
post_remove() {
EXTRAMODULES='extramodules-3.6-CHAKRA'
depmod $(cat /lib/modules/$EXTRAMODULES/version)
}
......@@ -8,10 +8,10 @@ _extramodules=extramodules-`pacman -Q linux-lts | cut -c11-13 | sed 's/linux-lts
_kver="$(cat /lib/modules/${_extramodules}/version)"
pkgname=nvidia-lts
pkgver=304.51
pkgrel=2
pkgver=310.19
pkgrel=1
pkgdesc="NVIDIA drivers for linux."
arch=('i686' 'x86_64')
arch=('x86_64')
url="http://www.nvidia.com/"
depends=('linux-lts>=3.0' 'linux-lts<3.1' "nvidia-utils=${pkgver}")
makedepends=('linux-lts-headers')
......@@ -19,17 +19,10 @@ conflicts=('nvidia-96xx-lts' 'nvidia-173xx-lts')
license=('custom')
install=nvidia.install
if [ "$CARCH" = "i686" ]; then
_ARCH='x86'
_pkg="NVIDIA-Linux-${_ARCH}-${pkgver}"
source=("http://us.download.nvidia.com/XFree86/Linux-${_ARCH}/${pkgver}/${_pkg}.run")
md5sums=('b7f908ea08218df08db06026215ec419')
elif [ "$CARCH" = "x86_64" ]; then
_ARCH='x86_64'
_pkg="NVIDIA-Linux-${_ARCH}-${pkgver}-no-compat32"
source=("http://us.download.nvidia.com/XFree86/Linux-${_ARCH}/${pkgver}/${_pkg}.run")
md5sums=('2ca10e05cd3b5d2a87caaaad9fd93c06')
fi
md5sums=('0ba08d32852e442ebba5ba22c7abed36')
build() {
cd "${srcdir}"
......
......@@ -8,7 +8,7 @@ _kver="$(cat /lib/modules/${_extramodules}/version)"
pkgname=('nvidia' 'chd-nvidia')
pkgver=310.19
pkgrel=1
pkgrel=2
arch=('x86_64')
url="http://www.nvidia.com/"
makedepends=('linux-headers' 'linux>=3.6' 'linux<3.7' "nvidia-utils=${pkgver}")
......
......@@ -8,7 +8,8 @@ post_upgrade() {
EXTRAMODULES='extramodules-3.6-CHAKRA'
depmod $(cat /lib/modules/$EXTRAMODULES/version)
echo -e '\e[31;46m WARNING'
echo -e '\e[31;46m If your card is from the 7xxx series or earlier, switch to nvidia-173xx'
echo -e '\e[31;46m If your card is from the 7xxx series or earlier, switch to nvidia-304xx'
echo -e '\e[31;46m pacman -S nvidia-304xx'
echo -e '\e[0m'
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment