Name        : nvidia                       Relocations: (not relocatable)
Version     : 7676                              Vendor: Penguin Liberation Front
Release     : 6plf                          Build Date: Tue 08 Nov 2005 
08:59:51 PM CET
Install Date: (not installed)               Build Host: ryu.zarb.org
Group       : System/Kernel and hardware    Source RPM: (none)
Size        : 20184272      License: Freeware
Signature   : (none)
Packager    : Anssi Hannula <[EMAIL PROTECTED]>
URL         : http://www.nvidia.com/object/unix.html
Summary     : NVIDIA dkms module, xorg driver and OpenGL libraries
Description :
Source package to build drivers for most GeForce/Quadro based video
cards.

This is in PLF for it's non-free license.

---------------
Anssi Hannula <[EMAIL PROTECTED]> 7676-6plf
- fix summary
- remove unneeded badperm fix
- move config edits to post/preun of nvidia-xorg
- enable hardware acceleration of the RENDER extension
- enable GLX even when the Composite X extension is loaded
---------------

---------------
Index: nvidia.spec
===================================================================
RCS file: /home/projects/plf/cvs/SPECS/non-free/nvidia/nvidia.spec,v
retrieving revision 1.5
diff -u -r1.5 nvidia.spec
--- nvidia.spec 31 Oct 2005 16:16:04 -0000      1.5
+++ nvidia.spec 8 Nov 2005 20:01:30 -0000
@@ -8,7 +8,7 @@
 
 %define distsuffix plf
 
-%define num_release 5
+%define num_release 6
 %define release %mkrel %num_release
 
 %define libraryname %{name}-opengl
@@ -28,7 +28,7 @@
 Name:          %{name}
 Version:       %{version}
 Release:       %{release}
-Summary:       NVIDIA dkms module for Kernel, Xorg Server and OpenGL libraries
+Summary:       NVIDIA dkms module, xorg driver and OpenGL libraries
 License:       Freeware
 Source0:       
http://download.nvidia.com/XFree86/Linux-x86/1.0-%{nrelease}/NVIDIA-Linux-x86-%{nvversion}-%{nrelease}-%{x86pkg_rel}.run
 Source1:       
http://download.nvidia.com/XFree86/Linux-x86_64/1.0-%{nrelease}/NVIDIA-Linux-x86_64-%{nvversion}-%{nrelease}-%{x86_64pkg_rel}.run
@@ -154,8 +154,6 @@
 install -d -m755 %{buildroot}/usr/src/%{module_name}-%{version}.%{release}
 install -m644 %{packagedir}/LICENSE 
%{buildroot}/usr/src/%{module_name}-%{version}.%{release}
 cp -a  %{packagedir}/usr/src/nv/* 
%{buildroot}/usr/src/%{module_name}-%{version}.%{release}
-# Fix bad perm
-chmod 755 %{buildroot}/usr/src/%{module_name}-%{version}.%{release}/conftest.sh
 
 # XvMC libraries
 install -d -m755 %{buildroot}%{_prefix}/X11R6/%{_lib}
@@ -235,8 +233,47 @@
 %postun -n %{lib_name} -p /sbin/ldconfig
 
 %post xorg
+if [ $1 = 1 ]; then
+       # Replace nv driver with nvidia when doing install.
+       if [[ -f %{_sysconfdir}/X11/xorg.conf ]]; then
+               sed -i '/^[[:space:]]*Driver[[:space:]]*"nv"/s/nv/nvidia/' 
%{_sysconfdir}/X11/xorg.conf
+               sed -i 
'/^[[:space:]]*Load[[:space:]]*".*glx.*"/s|".*"|"%{_prefix}/X11R6/%{_lib}/modules/extensions/nvidia/libglx.so"|'
 %{_sysconfdir}/X11/xorg.conf
+       
+               # Enable hardware acceleration of the RENDER extension
+               grep -q '^[[:space:]]*Option "RenderAccel"' 
%{_sysconfdir}/X11/xorg.conf || sed -i 
'/^[[:space:]]*Driver[[:space:]]*"nvidia".*$/s/$/\n    Option "RenderAccel" 
"1"/' %{_sysconfdir}/X11/xorg.conf
+       
+               # Enable GLX even when the Composite X extension is loaded
+               grep -q '^[[:space:]]*Option "AllowGLXWithComposite"' 
%{_sysconfdir}/X11/xorg.conf || sed -i 
'/^[[:space:]]*Driver[[:space:]]*"nvidia".*$/s/$/\n    Option 
"AllowGLXWithComposite" "1"/' %{_sysconfdir}/X11/xorg.conf
+       
+               # Mandriva does this, but why?
+               #grep -q '^[[:space:]]*Option "IgnoreEDID"' 
%{_sysconfdir}/X11/xorg.conf || sed -i 
'/^[[:space:]]*Driver[[:space:]]*"nvidia".*$/s/$/\n    Option "IgnoreEDID" 
"1"/'%{_sysconfdir}/X11/xorg.conf
+       fi
+       
+       # add nvidia to modprobe.preload
+       if [[ -f /etc/modprobe.preload ]];then
+               grep -q "^%{module_name}$" /etc/modprobe.preload || echo 
%{module_name} >> /etc/modprobe.preload
+       fi
+fi
+
 %{update_menus}
 
+%preun xorg
+if [ $1 = 0 ]; then
+       # Replace nvidia driver with nv when doing uninstall.
+       if [[ -f %{_sysconfdir}/X11/xorg.conf ]]; then
+               sed -i '/^[[:space:]]*Driver[[:space:]]*"nvidia"/s/nvidia/nv/' 
%{_sysconfdir}/X11/xorg.conf
+               sed -i 
'/^[[:space:]]*Load[[:space:]]*".*libglx.so"/s|"%{_prefix}/X11R6/%{_lib}/modules/extensions/nvidia/libglx.so"|"glx"|'
 %{_sysconfdir}/X11/xorg.conf
+               perl -pi -e 's/^[[:space:]]*Option "RenderAccel" "1".*\n//' 
%{_sysconfdir}/X11/xorg.conf
+               perl -pi -e 's/^[[:space:]]*Option "AllowGLXWithComposite" 
"1".*\n//' %{_sysconfdir}/X11/xorg.conf
+               #perl -pi -e 's/^[[:space:]]*Option "IgnoreEDID" "1".*\n//' 
%{_sysconfdir}/X11/xorg.conf
+       fi
+
+       # remove nvidia from modprobe.preload
+       if [[ -f /etc/modprobe.preload ]];then
+       perl -pi -e 's/^%{module_name}\n//' /etc/modprobe.preload
+       fi
+fi
+
 %postun xorg
 %{clean_menus}
 
@@ -246,42 +283,13 @@
 dkms install -m %{module_name} -v %{version}.%{release} --rpm_safe_upgrade
 
 # rmmod any old driver if present and not in use (e.g. by X)
-rmmod %{module_name} > /dev/null 2>&1
-
-if [ $1 = 1 ] ; then
-
-# Replace nv driver with nvidia when doing install.
-sed -i '/^[[:space:]]*Driver[[:space:]]*"nv"/s/nv/nvidia/' 
%{_sysconfdir}/X11/xorg.conf
-sed -i 
'/^[[:space:]]*Load[[:space:]]*".*glx.*"/s|".*"|"%{_prefix}/X11R6/%{_lib}/modules/extensions/nvidia/libglx.so"|'
 %{_sysconfdir}/X11/xorg.conf
-
-# Mandriva does this, but why?
-#grep -q '^[[:space:]]*Option "IgnoreEDID"' || sed -i 
'/^[[:space:]]*Driver[[:space:]]*"nvidia".*$/s/$/\n    Option "IgnoreEDID" "1"/'
-
-# add nvidia to modprobe.preload
-if [[ -f /etc/modprobe.preload ]];then
-       grep -q "^%{module_name}$" /etc/modprobe.preload || echo %{module_name} 
>> /etc/modprobe.preload
-fi
-
-fi
+rmmod %{module_name} > /dev/null 2>&1 || true
+modprobe %{module_name} > /dev/null 2>&1 || true
 
 %preun -n dkms-%{module_name}
 #Remove all nvidia modules for all kernels
 dkms remove -m %{module_name} -v %{version}.%{release} --all --rpm_safe_upgrade
 
-if [ $1 = 0 ] ; then
-
-# Replace nvidia driver with nv when doing uninstall.
-sed -i '/^[[:space:]]*Driver[[:space:]]*"nvidia"/s/nvidia/nv/' 
%{_sysconfdir}/X11/xorg.conf
-sed -i 
'/^[[:space:]]*Load[[:space:]]*".*libglx.so"/s|"%{_prefix}/X11R6/%{_lib}/modules/extensions/nvidia/libglx.so"|"glx"|'
 %{_sysconfdir}/X11/xorg.conf
-#perl -pi -e 's/[[:space:]]*Option "IgnoreEDID" "1".*$\n//'
-
-# remove nvidia from modprobe.preload
-if [[ -f /etc/modprobe.preload ]];then
-perl -pi -e 's/^%{module_name}\n//' /etc/modprobe.preload
-fi
-
-fi
-
 %files -n %{lib_name}
 %defattr(-,root,root)
 %{_sysconfdir}/ld.so.conf.d/%{lib_name}.conf
@@ -318,6 +326,13 @@
 /usr/src/%{module_name}-%{version}.%{release}
 
 %changelog
+* Tue Nov  8 2005 Anssi Hannula <[EMAIL PROTECTED]> 7676-6plf
+- fix summary
+- remove unneeded badperm fix
+- move config edits to post/preun of nvidia-xorg
+- enable hardware acceleration of the RENDER extension
+- enable GLX even when the Composite X extension is loaded
+
 * Mon Oct 31 2005 Anssi Hannula <[EMAIL PROTECTED]> 7676-5plf
 - %%clean_menus
 - fix descriptions


_______________________________________________
PLF-announce mailing list
[email protected]
https://www.zarb.org/mailman/listinfo/plf-announce

Reply via email to