Git-Url: 
http://git.frugalware.org/gitweb/gitweb.cgi?p=fwlive.git;a=commitdiff;h=9521ff358b8b999ec43cb8cdec8b2b13a8842eb6

commit 9521ff358b8b999ec43cb8cdec8b2b13a8842eb6
Author: janny <[EMAIL PROTECTED]>
Date:   Wed Mar 5 15:25:37 2008 +0100

nvidia-96xx-fwlive-96.43.05-4-i686
* version bump in fwlive repo

diff --git a/source/x11-extra/nvidia-96xx-fwlive/FrugalBuild 
b/source/x11-extra/nvidia-96xx-fwlive/FrugalBuild
index 5d5e6ac..06e8bd4 100644
--- a/source/x11-extra/nvidia-96xx-fwlive/FrugalBuild
+++ b/source/x11-extra/nvidia-96xx-fwlive/FrugalBuild
@@ -2,9 +2,9 @@
# Maintainer: AlexExtreme <[EMAIL PROTECTED]>

pkgname=nvidia-96xx-fwlive
-pkgver=1.0_9639
-nvver=`echo $pkgver|sed 's/_/-/'`
-pkgrel=3
+_F_archive_name=nvidia-96xx
+pkgver=96.43.05
+pkgrel=4
pkgdesc="3d accelerated display driver for Nvidia cards"
url="http://www.nvidia.com/object/linux_display_archive.html";
conflicts=('libgl' 'libglx' 'nvidia')
@@ -16,28 +16,28 @@ removes=(usr/bin/nvidia-{bug-report.sh,settings,xconfig}
groups=('x11-extra')
archs=('i686' 'x86_64')
up2date="lynx -dump http://www.nvidia.com/object/unix.html | grep -m1 'Latest 
Legacy.*1.0-96xx series'|sed 's/.*]//;s/-/_/'"
-if [ "$CARCH" == "x86_64" ]; then
-    jarch=x86_64 && sha1=4e5fb164881cf4d13b12a811bc03a367e6860a7b
-    pkgnum=2
+if [ "$CARCH" == "i686" ]; then
+       _arch=x86
+       pkgnum=1
+       sha1sums=('ee4b15c1e550607bcf0768490c8127c3ae0e565d')
else
-    jarch=x86 && sha1=ed7748c8f107cb4f5ec940915c2336c611049e5b
-    pkgnum=1
+       _arch=x86_64
+       pkgnum=2
+       sha1sums=('9f20838b33c54c3d54e7fdbe87a3b47d542d21f1')
fi
-source=(http://us.download.nvidia.com/XFree86/Linux-$jarch/$nvver/NVIDIA-Linux-$jarch-$nvver-pkg$pkgnum.run)
-sha1sums=($sha1)
+source=(http://us.download.nvidia.com/XFree86/Linux-$_arch/$pkgver/NVIDIA-Linux-$_arch-$pkgver-pkg$pkgnum.run)
options=('nostrip')
-#Finclude kernel-module
-kver=2.6.22-1
+Finclude kernel-module
+kver=2.6.24-3
depends=("kernel-fwlive=$kver")
makedepends=("kernel-fwlive-source=$kver")
_F_kernelmod_uname=`echo $kver|sed 's/-/-fw/'`
_F_kernelmod_dir="/lib/modules/$_F_kernelmod_uname"
depends=([EMAIL PROTECTED] 'xorg-server>=1.1.0' 'pciutils') ## TMP for gf4
-unset install
-install=$pkgname.install
+install=$_F_archive_name.install

build() {
-       nvdir=NVIDIA-Linux-$jarch-$nvver-pkg$pkgnum
+       nvdir=NVIDIA-Linux-$_arch-$pkgver-pkg$pkgnum
linkver=`echo $pkgver|sed 's/_/\./'`
cd $Fsrcdir
sh $nvdir.run --extract-only
@@ -81,4 +81,5 @@ build() {
Fdoc $nvdir/LICENSE
Fcpr $nvdir/usr/share/doc/* /usr/share/doc/$pkgname-$pkgver/
Fln "$pkgname-$pkgver" "/usr/share/doc/nvidia"
+       Fbuild_kernelmod_scriptlet
}
diff --git a/source/x11-extra/nvidia-96xx-fwlive/nvidia-96xx-fwlive.install 
b/source/x11-extra/nvidia-96xx-fwlive/nvidia-96xx-fwlive.install
deleted file mode 100644
index 491156d..0000000
--- a/source/x11-extra/nvidia-96xx-fwlive/nvidia-96xx-fwlive.install
+++ /dev/null
@@ -1,60 +0,0 @@
-post_install() {
-       echo "*** In order to use this package you have to accept Nvidia's 
license which"
-       echo "*** can be found at /usr/share/doc/nvidia/LICENSE."
-       echo "*** If you don't accept it, please remove the package!"
-       ## well here a 'WARNING' only on install | update because I don't know 
this
-       ## metamodes option will work for all
-       devnr=`lspci -nn|grep "GeForce4 \(.*\) Go \(.*\)M"|sed 
's/.*:\(.*\)].*/\1/'`
-
-       if [ "$devnr" ]; then
-               if [ "$devnr" -eq 0179 ]; then
-                       echo ""
-                       echo "*** WARNING: Nvidia  -  GeForce4 440/420 Go 
32/64M - with PCI ID: - 0x$devnr - detected."
-                       echo "*** WARNING: If you get an black screen try add 
this line to your xorg.conf in the DefaultDepth Section:"
-                       echo "Option   "\"metamodes\" "\"DFP: 
nvidia-auto-select +0+0; DFP: 800x600 +0+0; DFP: 640x480 +0+0\""
-                       echo ""
-               fi
-       fi
-
-       sed -i 's/^.*Load  "dri"/# Load  "dri"/' /etc/X11/xorg.conf
-       sed -i 's/Driver.*"\(nv\|vesa\|vga\)"/Driver "nvidia"/' 
/etc/X11/xorg.conf
-
-       exist=`cat /etc/sysconfig/modules | grep nvidia | wc -l`
-       if [ "$exist" -eq 0 ]; then
-               echo nvidia >> /etc/sysconfig/modules
-       fi
-       /sbin/depmod -a
-       /sbin/modprobe nvidia
-}
-
-post_upgrade() {
-       post_install $1
-}
-
-pre_remove() {
-       if test `lsmod | grep ^nvidia | wc -l` -gt 0; then
-               rmmod nvidia
-       fi
-
-       sed -i 's/^.*# Load  "dri"/Load  "dri"/' /etc/X11/xorg.conf
-       sed -i 's/\(^Driver *\)"nvidia"/\1"nv"/' /etc/X11/xorg.conf
-
-       exist=`cat /etc/sysconfig/modules | grep nvidia | wc -l`
-       if [ "$exist" -eq 1 ]; then
-               grep -v '^nvidia' /etc/sysconfig/modules > 
/etc/sysconfig/modules.tmp
-               mv /etc/sysconfig/modules.tmp /etc/sysconfig/modules
-       fi
-        if [ -e /usr/lib/xorg/temp/libglx.so ]; then
-                mv /usr/lib/xorg/temp/libglx.so 
/usr/lib/xorg/modules/extensions/
-        fi
-}
-
-post_remove() {
-       depmod -a
-       echo "*** Nvidia driver is removed now. To have a working Xorg Server 
again run : ***"
-       echo "*** pacman-g2 -S libgl libglx ****"
-}
-
-op=$1
-shift
-$op $*
diff --git a/source/x11-extra/nvidia-96xx-fwlive/nvidia-96xx.install 
b/source/x11-extra/nvidia-96xx-fwlive/nvidia-96xx.install
new file mode 100644
index 0000000..d346d07
--- /dev/null
+++ b/source/x11-extra/nvidia-96xx-fwlive/nvidia-96xx.install
@@ -0,0 +1,84 @@
+post_install() {
+       echo "*** In order to use this package you have to accept Nvidia's 
license which"
+       echo "*** can be found at /usr/share/doc/nvidia-*/LICENSE."
+       echo "*** If you don't accept it, please remove the package!"
+       ## well here a 'WARNING' only on install | update because I don't know 
this
+       ## metamodes option will work for all
+       devnr=`/usr/sbin/lspci -nn|grep "GeForce4 \(.*\) Go \(.*\)M"|sed 
's/.*:\(.*\)].*/\1/'`
+
+       if [ "$devnr" ]; then
+               if [ "$devnr" -eq 0179 ]; then
+                       echo ""
+                       echo "*** WARNING: Nvidia  -  GeForce4 440/420 Go 
32/64M - with PCI ID: - 0x$devnr - detected."
+                       echo "*** WARNING: If you get an black screen try add 
this line to your xorg.conf in the DefaultDepth Section:"
+                       echo "Option   "\"metamodes\" "\"DFP: 
nvidia-auto-select +0+0; DFP: 800x600 +0+0; DFP: 640x480 +0+0\""
+                       echo ""
+               fi
+       fi
+
+       if [ -e /etc/X11/xorg.conf ]; then
+               sed -i 's/^.*Load  "dri"/# Load  "dri"/' /etc/X11/xorg.conf
+               sed -i 's/Driver.*"\(nv\|vesa\|vga\)"/Driver "nvidia"/' 
/etc/X11/xorg.conf
+       else
+               echo "WARNING: /etc/X11/xorg.conf does not exist!"
+       fi
+
+       exist=`cat /etc/sysconfig/modules | grep nvidia | wc -l`
+       if [ "$exist" -eq 0 ]; then
+               echo nvidia >> /etc/sysconfig/modules
+       fi
+       /sbin/depmod -ea $_F_kernelmod_uname
+       ## if nvidia dependent kernel is the current kernel
+       if [ -e /lib/modules/`uname -r`/kernel/drivers/video/nvidia.ko ]; then
+               ## Try to load it
+               /sbin/modprobe nvidia
+       fi
+}
+
+post_upgrade() {
+       echo -n "Runing depmod for nvidia kernel module for kernel 
$_F_kernelmod_uname ..."
+       /sbin/depmod -ea $_F_kernelmod_uname
+       echo " done."
+        ## if that exisit we bumped / upgraded the package only no new kernel
+       ## on a new kernel we do nothing because one has to reboot anyway
+       if [ -e /lib/modules/`uname -r`/kernel/drivers/video/nvidia.ko ]; then
+               ## see if is loaded , if yes kill it and modprobe again if not 
do nothing
+               if grep -q nvidia /proc/modules; then
+                       echo -n "Reloading nvidia kernel module.."
+                               modprobe --remove nvidia
+                               sleep 1
+                               modprobe nvidia
+                       echo " done."
+               fi
+       fi
+}
+
+pre_remove() {
+       if test `lsmod | grep ^nvidia | wc -l` -gt 0; then
+               /sbin/modprobe --remove nvidia
+       fi
+
+       if [ -e /etc/X11/xorg.conf ]; then
+               sed -i 's/^.*# Load  "dri"/Load  "dri"/' /etc/X11/xorg.conf
+               sed -i 's/\(^Driver *\)"nvidia"/\1"nv"/' /etc/X11/xorg.conf
+       fi
+
+       exist=`cat /etc/sysconfig/modules | grep nvidia | wc -l`
+       if [ "$exist" -eq 1 ]; then
+               grep -v '^nvidia' /etc/sysconfig/modules > 
/etc/sysconfig/modules.tmp
+               mv /etc/sysconfig/modules.tmp /etc/sysconfig/modules
+       fi
+        if [ -e /usr/lib/xorg/temp/libglx.so ]; then
+                mv /usr/lib/xorg/temp/libglx.so 
/usr/lib/xorg/modules/extensions/
+        fi
+}
+
+post_remove() {
+       /sbin/depmod -a $_F_kernelmod_uname
+       echo "*** Nvidia driver is removed now. To have a working Xorg Server 
again run : ***"
+       echo "*** pacman-g2 -S libgl libglx ****"
+}
+
+op=$1
+shift
+$op $*
_______________________________________________
Frugalware-git mailing list
Frugalware-git@frugalware.org
http://frugalware.org/mailman/listinfo/frugalware-git

Reply via email to