# # spec file for package x11-video-nvidia-1-0-9746+ (Version 0) # # Copyright (c) 2007 SUSE LINUX Products GmbH, Nuernberg, Germany. # This file and all modifications and additions to the pristine # package are under the same license as the package itself. # # Please submit bugfixes or comments via http://bugs.opensuse.org/ # # norootforbuild # nodebuginfo Name: x11-video-nvidia-1-0-9746+ BuildRequires: update-desktop-files %define major 1 %define minor 0 %define patch 9746 %define driver_version %(echo %{major}.%{minor}-%{patch}) %if %suse_version > 1010 || "%_repository" == "SLE_10_XORG7" %define xlibdir /usr/%_lib/xorg %else %define xlibdir /usr/X11R6/%_lib %endif %define GENERATE_IDENTITY_MAP 1 License: Freely Redistributable Software (FSR) Group: System/Libraries Provides: x11-video-nvidia Obsoletes: x11-video-nvidia Summary: nvidia GL drivers Version: %{major}.%{minor}.%{patch} Release: 1 Source0: http://download.nvidia.com/XFree86/Linux-x86/%{driver_version}/NVIDIA-Linux-x86-%{driver_version}-pkg1.run Source1: http://download.nvidia.com/XFree86/Linux-x86_64/%{driver_version}/NVIDIA-Linux-x86_64-%{driver_version}-pkg2.run Source2: pci_ids-%{driver_version} Source3: nvidia-settings.desktop Source4: fetch.sh Source5: README Source6: Xwrapper NoSource: 0 NoSource: 1 NoSource: 4 NoSource: 5 BuildRoot: %{_tmppath}/%{name}-%{version}-build %description nvidia GL drivers Authors: -------- NVIDIA %prep %setup -n . -T -D rm -rf $RPM_BUILD_DIR/* %ifarch %ix86 sh %{SOURCE0} -x %endif %ifarch x86_64 sh %{SOURCE1} -x %endif %build # nothing %install cd NVIDIA-Linux-x86*-%driver_version-* # would be nice if it worked ... #./nvidia-installer \ # --accept-license \ # --expert \ # --no-questions \ # --ui=none \ # --no-precompiled-interface \ # --no-runlevel-check \ # --no-rpms \ # --no-backup \ # --no-network \ # --no-recursion \ # --no-kernel-module \ # --log-file-name=$PWD/log \ # --x-prefix=$RPM_BUILD_ROOT/usr/X11R6 \ # --opengl-prefix=$RPM_BUILD_ROOT/usr \ # --utility-prefix=$RPM_BUILD_ROOT/usr install -d $RPM_BUILD_ROOT/usr/bin install -d $RPM_BUILD_ROOT/usr/X11R6/lib install -d $RPM_BUILD_ROOT/usr/lib/tls install -d $RPM_BUILD_ROOT/usr/X11R6/%_lib install -d $RPM_BUILD_ROOT/usr/%_lib/tls install -d $RPM_BUILD_ROOT/usr/X11R6/%_lib/tls install -d $RPM_BUILD_ROOT/%{xlibdir}/modules/updates/drivers install -d $RPM_BUILD_ROOT/%{xlibdir}/modules/updates/extensions install -d $RPM_BUILD_ROOT/usr/include/nvidia/GL install -d $RPM_BUILD_ROOT/etc/ld.so.conf.d install usr/bin/nvidia-settings $RPM_BUILD_ROOT/usr/bin install usr/bin/nvidia-bug-report.sh $RPM_BUILD_ROOT/usr/bin install usr/bin/nvidia-xconfig $RPM_BUILD_ROOT/usr/bin install usr/lib/tls/libnvidia-tls.so.* $RPM_BUILD_ROOT/usr/%_lib/tls install usr/lib/libnvidia* $RPM_BUILD_ROOT/usr/%_lib # the GL lib from Mesa is in /usr/%_lib so we install in /usr/X11R6/%_lib rm usr/lib/libGL.la install usr/lib/libGL* $RPM_BUILD_ROOT/usr/X11R6/%_lib install usr/X11R6/lib/modules/libnvidia-wfb.so.%{major}.%{minor}.%{patch} \ $RPM_BUILD_ROOT/%{xlibdir}/modules/updates ln -sf libnvidia-wfb.so.%{major}.%{minor}.%{patch} $RPM_BUILD_ROOT/%{xlibdir}/modules/updates/libnvidia-wfb.so.%{major} ln -sf libnvidia-wfb.so.%{major} $RPM_BUILD_ROOT/%{xlibdir}/modules/updates/libwfb.so install usr/X11R6/lib/modules/drivers/nvidia_drv.so $RPM_BUILD_ROOT/%{xlibdir}/modules/updates/drivers install usr/X11R6/lib/modules/extensions/libglx.so.%{major}.%{minor}.%{patch} \ $RPM_BUILD_ROOT/%{xlibdir}/modules/updates/extensions ln -sf libglx.so.%{major}.%{minor}.%{patch} $RPM_BUILD_ROOT/%{xlibdir}/modules/updates/extensions/libglx.so install usr/X11R6/lib/libXvMCNVIDIA* $RPM_BUILD_ROOT/usr/X11R6/%_lib %ifarch x86_64 install usr/lib32/tls/libnvidia-tls.so.* $RPM_BUILD_ROOT/usr/lib/tls install usr/lib32/libnvidia* $RPM_BUILD_ROOT/usr/lib install usr/lib32/libGL* $RPM_BUILD_ROOT/usr/X11R6/lib %endif install usr/include/GL/* $RPM_BUILD_ROOT/usr/include/nvidia/GL install -d $RPM_BUILD_ROOT/usr/share/doc/packages/%name cp -a usr/share/doc/* $RPM_BUILD_ROOT/usr/share/doc/packages/%name install -m 644 LICENSE $RPM_BUILD_ROOT/usr/share/doc/packages/%name install -d $RPM_BUILD_ROOT/%{_mandir}/man1 install -m 644 usr/share/man/man1/* $RPM_BUILD_ROOT/%{_mandir}/man1 %suse_update_desktop_file -i nvidia-settings System SystemSetup install -d $RPM_BUILD_ROOT/usr/share/pixmaps install -m 644 usr/share/pixmaps/nvidia-settings.png \ $RPM_BUILD_ROOT/usr/share/pixmaps /sbin/ldconfig -n $RPM_BUILD_ROOT/usr/%_lib /sbin/ldconfig -n $RPM_BUILD_ROOT/usr/X11R6/%_lib #echo "/usr/%_lib/nvidia" > $RPM_BUILD_ROOT/etc/ld.so.conf.d/nvidia.conf %ifarch x86_64 /sbin/ldconfig -n $RPM_BUILD_ROOT/usr/lib /sbin/ldconfig -n $RPM_BUILD_ROOT/usr/X11R6/lib # would be nice but ld.so.conf is too broken #echo "/usr/lib/nvidia" >> $RPM_BUILD_ROOT/etc/ld.so.conf.d/nvidia.conf %endif %if %GENERATE_IDENTITY_MAP mkdir -p $RPM_BUILD_ROOT//usr/share/sax/sysp/maps/update/ \ $RPM_BUILD_ROOT/usr/share/sax/api/data/cdb/ \ $RPM_BUILD_ROOT/var/lib/hardware/ids > $RPM_BUILD_ROOT/usr/share/sax/sysp/maps/update/Identity.map.%name > $RPM_BUILD_ROOT/usr/share/sax/api/data/cdb/Cards.%name > $RPM_BUILD_ROOT/var/lib/hardware/ids/%name # undocumented/secret devices (sh) (cat %_sourcedir/pci_ids-%{driver_version}; \ echo "0x02e0 GeForce 7600 GT (AGP)"; \ ) | \ while read line; do VID=0x10de NAME=NVIDIA SERVER=nvidia DEVICE=$(echo $line|awk '{for (i=2;i> $RPM_BUILD_ROOT/usr/share/sax/sysp/maps/update/Identity.map.%name << EOF NAME=${NAME}&DEVICE=${DEVICE}&VID=${VID}&DID=${DID}&SERVER=${SERVER}&EXT=&OPT=&RAW=&PROFILE=&SCRIPT3D=&PACKAGE3D=&FLAG=DEFAULT NAME=${NAME}&DEVICE=${DEVICE}&VID=${VID}&DID=${DID}&SERVER=${SERVER}&EXT=&OPT=&RAW=&PROFILE=&SCRIPT3D=&PACKAGE3D=&FLAG=3D EOF cat >> $RPM_BUILD_ROOT/usr/share/sax/api/data/cdb/Cards.%name << EOF ${NAME}:${DEVICE} { Driver = ${SERVER} Flag = 3D 3DDriver = ${SERVER} } EOF cat >> $RPM_BUILD_ROOT/var/lib/hardware/ids/%name << EOF vendor.id pci ${VID} &device.id pci ${DID} +device.name ${DEVICE} +driver.xfree 4|${SERVER} +driver.xfree 4|${SERVER}|3d EOF echo >> $RPM_BUILD_ROOT/var/lib/hardware/ids/%name done %endif %if %suse_version > 1010 install -m 755 $RPM_SOURCE_DIR/Xwrapper $RPM_BUILD_ROOT/usr/bin/X.%name %else mkdir -p $RPM_BUILD_ROOT/usr/X11R6/bin install -m 755 $RPM_SOURCE_DIR/Xwrapper $RPM_BUILD_ROOT/usr/X11R6/bin/X.%name %endif %post /sbin/ldconfig if [ -f etc/X11/xorg.conf ]; then test -f etc/X11/xorg.conf.nvidia-post || \ cp etc/X11/xorg.conf etc/X11/xorg.conf.nvidia-post fi test -x usr/bin/switch2nvidia && usr/bin/switch2nvidia if ls var/lib/hardware/ids/* &> /dev/null; then > var/lib/hardware/hd.ids for i in var/lib/hardware/ids/*; do cat $i >> var/lib/hardware/hd.ids done fi test -f etc/sysconfig/displaymanager && \ . etc/sysconfig/displaymanager %if %suse_version > 1010 sed -i s/REPLACE_ME/${DISPLAYMANAGER_XSERVER}/g usr/bin/X.%name %else sed -i s/REPLACE_ME/${DISPLAYMANAGER_XSERVER}/g usr/X11R6/bin/X.%name %endif test -f etc/sysconfig/displaymanager && \ sed -i 's/DISPLAYMANAGER_XSERVER=.*/DISPLAYMANAGER_XSERVER=X.%name/g' \ etc/sysconfig/displaymanager %if %suse_version > 1010 test -x /etc/X11/xdm/SuSEconfig.xdm && \ /etc/X11/xdm/SuSEconfig.xdm %else test -x /sbin/conf.d/SuSEconfig.xdm && \ SuSEconfig --module xdm %endif exit 0 %postun /sbin/ldconfig if [ "$1" -eq 0 ]; then test -x usr/bin/switch2nv && usr/bin/switch2nv if ls var/lib/hardware/ids/* &> /dev/null; then > var/lib/hardware/hd.ids for i in var/lib/hardware/ids/*; do cat $i >> var/lib/hardware/hd.ids done else rm -f var/lib/hardware/hd.ids fi test -f etc/X11/xorg.conf && \ cp etc/X11/xorg.conf etc/X11/xorg.conf.nvidia-postun if [ -r etc/X11/xorg.conf.nvidia-post ]; then mv etc/X11/xorg.conf.nvidia-post etc/X11/xorg.conf else sax2 -a -r fi test -x /opt/gnome/bin/gnome-xgl-switch && \ /opt/gnome/bin/gnome-xgl-switch --disable-xgl fi exit 0 %files %defattr(-,root,root) %doc /usr/share/doc/packages/%{name} %doc %{_mandir}/man1/* #/etc/ld.so.conf.d/nvidia.conf %if %suse_version > 1010 /usr/bin/X.%name %else /usr/X11R6/bin/X.%name %endif /usr/bin/nvidia* %dir /usr/include/nvidia /usr/include/nvidia/GL /usr/X11R6/%_lib/lib* %dir /usr/%_lib/tls /usr/%_lib/tls/lib* /usr/%_lib/lib* %ifarch x86_64 /usr/X11R6/lib/lib* %dir /usr/lib/tls /usr/lib/tls/lib* /usr/lib/lib* %endif %if %suse_version > 1010 || "%_repository" == "SLE_10_XORG7" %dir %{xlibdir} %endif %dir %{xlibdir}/modules %dir %{xlibdir}/modules/updates %{xlibdir}/modules/updates/libnvidia-wfb.so.%{major}.%{minor}.%{patch} %{xlibdir}/modules/updates/libnvidia-wfb.so.%{major} %{xlibdir}/modules/updates/libwfb.so %{xlibdir}/modules/updates/drivers %{xlibdir}/modules/updates/extensions /usr/share/applications/*.desktop /usr/share/pixmaps/*.png %if %GENERATE_IDENTITY_MAP %dir /usr/share/sax %dir /usr/share/sax/api/ %dir /usr/share/sax/api/data %dir /usr/share/sax/sysp %dir /usr/share/sax/sysp/maps %dir /var/lib/hardware /usr/share/sax/api/data/cdb/ /usr/share/sax/sysp/maps/update/ /var/lib/hardware/ids/ %endif %changelog -n x11-video-nvidia-1-0-9746+ * Sun Jan 14 2007 - sndirsch@suse.de - created new changelog entry (no real changes) * Tue Jan 09 2007 - sndirsch@suse.de - finally fixed build * Mon Jan 08 2007 - sndirsch@suse.de - fixed build * Mon Jan 08 2007 - sndirsch@suse.de - unload the kernel module the first time Xserver is started after update (Bug #219456) * Wed Jan 03 2007 - sndirsch@suse.de - added support for undocumented/secret device "0x02e0 GeForce 7600 GT (AGP)" * Thu Dec 21 2006 - sndirsch@suse.de - updated to release 1.0-9746 * Added support for GeForce 8800 GTS and GeForce 8800 GTX boards. * Mon Dec 04 2006 - sndirsch@suse.de - updated to release 1.0-9631 * Fixed an OpenGL crash on some GeForce 3 and GeForce 4 GPUs. * Fixed an X server crash starting some fullscreen OpenGL games. * Improved interaction with newer Linux kernels. * Fri Nov 10 2006 - sndirsch@suse.de - fixed build for SUSE 10.1 / SLE10 * Wed Nov 08 2006 - sndirsch@suse.de - updated to release 1.0-9629 * Added initial support for GLX_EXT_texture_from_pixmap. * Added new "Display Configuration" page in nvidia-settings. * Improved workstation OpenGL performance in Xinerama. * Added support for NVIDIA Quadro Plex. * Added support for Quad SLI. * Improved X driver error recovery. * Improved workstation overlay performance. * Added SMBus functionality to the Linux/i2c interface. * Fixed DFP scaling support. * Added support for OpenGL 2.1. * Added new "TwinViewXineramaInfoOrder" X configuration option to control the order of display devices when in TwinView. * Fixed some problems related to TV Out. * Added new NVIDIA logo artwork to nvidia-settings and X driver splashscreen; the X driver splashscreen can now be configured with the new "LogoPath" X configuration option. * Mon Nov 06 2006 - sndirsch@suse.de - added installer download script * Tue Oct 17 2006 - sndirsch@suse.de - updated to release 1.0-9626 to fix root exploit (Bug #212882) * Thu Aug 24 2006 - sndirsch@suse.de - updated to driver release 1.0-8774 * Added support for X.Org 7.1. * Added support for XVideo with the Composite X extension when using X.Org 7.1. * Improved interaction with newer Linux kernels. * Sat Jul 15 2006 - sndirsch@suse.de - added /usr/%%_lib/xorg directory to %%files section to fix build * Fri Jul 07 2006 - sndirsch@suse.de - adjusted to new module path used by X.Org 7 * Mon Jul 03 2006 - sndirsch@suse.de - during uninstall disable Xgl, and restore previous xorg.conf or create new one by SaX2 respectively (Bug #189573) * Tue Jun 06 2006 - sndirsch@suse.de - added libhd/hwinfo information (Bug #175683) * Tue May 30 2006 - dmueller@suse.de - don't install libGL.la file because its broken and we want the one from Mesa-devel * Thu May 25 2006 - sndirsch@suse.de - marked NVIDIA installer as Nosource to save space * Wed May 24 2006 - sndirsch@suse.de - updated to driver release 1.0-8762 (Bug #175683) * Fri May 19 2006 - sndirsch@suse.de - no longer use the NVIDIA installer (radical change) * Thu May 18 2006 - sndirsch@suse.de - make sure Mesa, xorg-x11-driver-video-nvidia and xorg-x11-server-glx are installed before x11-video-nvidia; otherwise the NVIDIA driver will be uninstalled by these packages immediately again (Bug #175683) * Wed May 10 2006 - sndirsch@suse.de - added Cards.x11-video-fglrx for SaX2; information is generated from the pci_ids meta file * Wed May 10 2006 - sndirsch@suse.de - added Identity.map.x11-video-nvidia for SaX2; information is generated from the pci_ids meta file * Tue May 02 2006 - sndirsch@suse.de - %%postun: switch2nv needs to be done before driver uninstall * Thu Apr 27 2006 - sndirsch@suse.de - requires correct driver version * Tue Apr 25 2006 - sndirsch@suse.de - use switch2nv/switch2nvidia to switch nv/nvidia driver configuration (%%post/%%postun) - improved driver installation in %%post * Tue Apr 25 2006 - sndirsch@suse.de - created user space driver package