Jump to content

thac

Members
  • Posts

    218
  • Joined

  • Last visited

Posts posted by thac

  1. Sorry i dont think i read your first post carefully enogh but now i did.

    i should guess that your problem is caused by the fact that you dowloaded

    all in kde-3.4.0 dir an installed from there.

    But since the qt rpm has not changed is theese still in the kde-3.3.2 folder this goes

    for the new xgd menu system and not to forget the xorg-6.8.2 rpms.

     

    So a proper urpmi database setup is the most important thing to manage then the install is very simple

     

    as root type urpmi kdebase

     

    /Torbjörn Turpeinen (Thac)

  2. I have made rpms for NVIDIA-4620 NVIDIA-5341 NVIDIA-6111 and fglrx-3.9.0

    I have them compiled for the latest sds kernel 2.6.7-1.sds.37mdk at my site.

    I have compile new versions for the latest mandrake-10.0 kernels

    2.4.25-7mdk and 2.6.3-15mdk and i will upload them tomorrow

    the srpms should compile for any mandrake,multimedia,tmb or sds kernel.

    They will be available at

    http://rpm.nyvalls.se/graphics10.0.html

     

    /Torbjörn Turpeinen (Thac)

  3. Im using the multimedia kernel so i wanted my own

    NVIDIA RPMS i used Texstars spec files to start with

    and altered them to fit my needs he has added

    some code that makes all the needed modifications to

    the Xfree config files in Mandrake.

    Any way you can easily use theese ones to build rpms

    for any kernel.

     

    /thac

     

    #

    # Spec file for NVIDIA X server module and OpenGL libraries.

    #

    # /usr/X11R6 is relocatable.

    #

    # $Header: //sw/main/drivers/NVIDIA_GLX.spec#24 $

    #

    %define RELEASE 4496

    %define rel %{?CUSTOM_RELEASE} %{!?CUSTOM_RELEASE:%RELEASE}

    %define ver 1.0

    %define nam NVIDIA_GLX

     

    Summary: NVIDIA module for XFree86 4.0 X server and OpenGL libraries

    Name: NVIDIA_multimedia_GLX

    Version: %{ver}mdk

    Release: %rel

    Copyright: NVIDIA Corp. 2000

    Group: User Interface/X Hardware Support

    Source: ftp://ftp1.detonator.nvidia.com/pub/drive...RELEASE}.tar.gz

    URL: http://www.nvidia.com

    Vendor: NVIDIA Corp.

    Packager: Buildmeister

    Prefix: /usr/X11R6

    Requires: XFree86 >= 4.0.1

    Requires: NVIDIA_multimedia_kernel

    Requires: kernel > 2.2.0

    BuildRoot: %{_tmppath}/%{name}-%{PACKAGE_VERSION}

     

    # disable build root strip policy

    # XFree86 drivers may NOT be stripped...

    %define __spec_install_post /usr/lib/rpm/brp-compress

     

    %description

    NVIDIA Architecture support for Common X and OpenGL for all Linux systems.

    NVIDIA XFree86 4.0 server module and OpenGL 1.2 libraries for RIVA TNT/TNT2

    and GeForce/Quadro based video cards. Older RIVA 128 based video cards are

    supported by the server module shipping with XFree86 4.0, nv_drv.o. You

    should install this package if you have one of the newer cards.

     

    You must also install the NVIDIA_kernel module if you want to utilize these

    drivers.

     

    %prep

    %setup -q -n %{nam}-%{ver}-${RPM_PACKAGE_RELEASE}

     

    %build

     

    %install

    DSOMAJOR=1

    DSOMINOR=0

    DSOPATCH=4496

    DSOREV=$DSOMAJOR.$DSOMINOR.$DSOPATCH

     

    [ -n "$RPM_BUILD_ROOT" -a "$RPM_BUILD_ROOT" != / ] && rm -rf $RPM_BUILD_ROOT

    mkdir -p $RPM_BUILD_ROOT/usr/X11R6/lib/modules/drivers

    mkdir -p $RPM_BUILD_ROOT/usr/X11R6/lib/modules/extensions

    mkdir -p $RPM_BUILD_ROOT/usr/lib

     

    install usr/X11R6/lib/modules/drivers/nvidia_drv.o $RPM_BUILD_ROOT/usr/X11R6/lib/modules/drivers/nvidia_drv.o

    install usr/X11R6/lib/modules/extensions/libglx.so.$DSOREV $RPM_BUILD_ROOT/usr/X11R6/lib/modules/extensions/libglx.so.$DSOREV

    install usr/X11R6/lib/libXvMCNVIDIA.a $RPM_BUILD_ROOT/usr/X11R6/lib/libXvMCNVIDIA.a

    install usr/X11R6/lib/libXvMCNVIDIA.so.$DSOREV $RPM_BUILD_ROOT/usr/X11R6/lib/libXvMCNVIDIA.so.$DSOREV

    install usr/lib/libGLcore.so.$DSOREV $RPM_BUILD_ROOT/usr/lib/libGLcore.so.$DSOREV

    install usr/lib/libGL.so.$DSOREV $RPM_BUILD_ROOT/usr/lib/libGL.so.$DSOREV

     

    %pre

     

    # if /usr/lib/libGL.so is pointing to libGL.so.1, we are upgrading.

    # This is good. We just delete libGL.so. We'll set it up later.

    # If not, leave it alone, we'll complain later

    if [ -e /usr/lib/libGL.so ]; then

    LIBGL=`ls -l /usr/lib/libGL.so | sed 's/.*->[ ]*(.*)$/1/'`

    if [ X$LIBGL = X"libGL.so.1" ]; then

    rm -f /usr/lib/libGL.so

    fi

    fi

     

    problem=0

    first_time=0

     

    check_file() {

    if [ -f $1 ]; then

    # remove symlinks, and append .RPMSAVE to real files

    if [ -h $1 ]; then

    rm -f $1

    else

    problem=1

    if [ $first_time -eq 0 ]; then

    echo " --- WARNING!!"

    first_time=1

    fi

    mv $1 xxx.$1.RPMSAVE

    echo " $1"

    fi

    fi

    }

     

    final_check() {

    if [ $problem -eq 1 ]; then

    echo " --- The above file(s) possibly belong to a conflicting MESA rpm,"

    echo " --- or to a previous stale NVIDIA distribution."

    echo " --- They have been renamed to xxx.<originalFile>.RPMSAVE to"

    echo " --- avoid conflicting with the files contained within this"

    echo " --- package."

    echo " --- Please see the FREQUENTLY ASKED QUESTIONS section of"

    echo " --- /usr/share/doc/NVIDIA_GLX-1.0/README for more details."

    fi

    }

     

    #

    # Warn people that we have problems with those.

    #

     

    # Gaurd against the posibility that this directory doesn't exist

    if [ -d /usr/X11R6/lib/modules/extensions ]; then

    cd /usr/X11R6/lib/modules/extensions

    check_file libglx.a

    check_file libGLcore.a

    fi

     

    # shouldn't need to change directories here, but just in case..

    # We do, RedHat's Mesa packages install to /usr/lib now

    cd /usr/lib

    check_file libGL.a

    for file in libGL.so*

    do

    check_file $file

    done

     

    cd /usr/X11R6/lib

    check_file libGL.a

    for file in libGL.so*

    do

    check_file $file

    done

     

    for file in libGLcore.so*

    do

    check_file $file

    done

     

    final_check

     

    %post

    DSOMAJOR=1

    DSOMINOR=0

    DSOPATCH=4191

    DSOREV=$DSOMAJOR.$DSOMINOR.$DSOPATCH

     

    /sbin/ldconfig

    /sbin/ldconfig -n /usr/X11R6/lib/modules/extensions

    /sbin/ldconfig -n /usr/X11R6/lib

     

    # create compile-time links

    cd /usr/lib

    ln -sf libGL.so.$DSOMAJOR libGL.so

     

    %postun

     

    first_time=0

     

    restore_files () {

    # Just get them all, hopefully noone else filled in any

    for i in `ls xxx.*.RPMSAVE 2> /dev/null` ; do

    # In earlier releases we could end up creating xxx.*.RPMSAVE files from

    # our own files. There is no point in restoring those.

    if [ "`grep -a -c -e "NVIDIA Corporation" $1`" -eq 0 ]; then

    # Rename RPMSAVE files that are not our own

    if [ $first_time -eq 0 ]; then

    echo " --- WARNING!!"

    first_time=1

    fi

    filename=`echo $i | sed -e "s/xxx.//" -e "s/.RPMSAVE//"`

    echo " $i"

    mv $i $filename

    else

    # remove our own

    rm $i

    fi

    done

    }

     

    final_check() {

    if [ $first_time -ne 0 ]; then

    echo " --- The above files are apparently saved files from a"

    echo " --- non-NVIDIA distribution (possibly MESA) that were"

    echo " --- put aside while the NVIDIA rpm was installed."

    echo " --- They are now being restored."

    fi

    }

     

     

    # $1 contains the number of instances of this package that will be

    # installed after the operation has completed. So [ $1 = 1 ] ==>

    # upgrade and [ $1 = 0 ] ==> uninstall. In the uninstall case we

    # need to clean up.

    if [ $1 = 0 ]; then

    # Restore the Mesa libraries that we saved away at install time

    cd /usr/X11R6/lib/modules/extensions

    restore_files

     

    cd /usr/lib

    restore_files

     

    cd /usr/X11R6/lib

    restore_files

     

    final_check

     

    # Remove any symlinks that would have been created for our shared libraries.

    # Symlinkds required for Mesa will be recreated when ldconfig is run

    # but symlinks specific to our drivers will be left dangling

    # (/usr/lib/libGLcore.so.1 does this). These don't get removed by uninstall

    # because we didn't install them, ldconfig created them

    rm -f /usr/lib/libGLcore.so.1

    rm -f /usr/lib/libGLcore.so

    rm -f /usr/lib/libGL.so.1

    rm -f /usr/lib/libGL.so

    rm -f /usr/X11R6/lib/modules/extensions/libglx.so

    fi

     

    /sbin/ldconfig

     

    %clean

    [ -n "$RPM_BUILD_ROOT" -a "$RPM_BUILD_ROOT" != / ] && rm -rf $RPM_BUILD_ROOT

     

    %files

    %defattr (-, root, root)

    %doc usr/share/doc/README

    %doc usr/share/doc/README.DE

    %doc usr/share/doc/license.txt

    %doc usr/share/doc/NVIDIA_Changelog

    %doc usr/share/doc/XF86Config.sample

    # Install these headers in the doc dir so as not to destroy the installed

    # headers but still give the user the option to use them

    %doc usr/include

    /usr/X11R6/lib/modules/drivers/nvidia_drv.o

    /usr/X11R6/lib/modules/extensions/libglx.so.1.0.4496

    %attr (0644, root, root) /usr/X11R6/lib/libXvMCNVIDIA.a

    /usr/X11R6/lib/libXvMCNVIDIA.so.1.0.4496

    /usr/lib/libGLcore.so.1.0.4496

    /usr/lib/libGL.so.1.0.4496

     

    %changelog

    * Wed Jul 30 2003 Torbjorn Turpeinen <tobbe@nyvalls.se>

    - Updated to latest version

     

    * Mon Mar 17 2003 Texstar

    - Build for Mandrake 9.1

     

    * Mon May 13 2002 George Kyriazis <kyriazis@nvidia.com>

    - Install libXvMCNVIDIA.so, too.

     

    * Mon Mar 4 2002 Joseph Kain <jkain@nvidia.com>

    - Install README.DE

     

    * Tue Feb 26 2002 Joseph Kain <jkain@nvidia.com>

    - libXvMCNVIDIA.so is now libXvMCNVIDIA.a

     

    * Thu Feb 21 2002 George Kyriazis <kyriazis@nvidia.com>

    - Added libXvMCNVIDIA.so

     

    * Sat Feb 16 2002 Joseph Kain <jkain@nvidia.com>

    - Protect against missing directories, specifically

    /usr/X11R6/lib/modules/extensions

     

    * Mon Nov 26 2001 Joseph Kain <jkain@nvidia.com>

    - Install license file

     

    * Mon Nov 26 2001 Joseph Kain <jkain@nvidia.com>

    - Use %{_tmppath} instead of hardcoding /var/tmp

     

    * Wed Mar 28 2001 Joseph Kain <jkain@nvidia.com>

    - Stop renaming our own old libraries with xxx.*.RPMSAVE

    - Detect uninstall case to restore saved Mesa libs and remove extra symlinks

    - added gl.h and glx.h

     

    * Mon May 1 2000 George Kyriazis <kyriazis@nvidia.com>

    - Fixed installation of revisions of shared libraries.

     

    * Thu Apr 27 2000 Gregory McLean <gregm@comstar.net>

    - Added BuildRoot definition.

    - Added some logic to deal with the two most common problems.

    - Added the FAQ.

    - Added logic for epoc builds if needed.

     

     

     

     

    #

    # Spec file for NVIDIA kernel module.

    #

    # $Header: //sw/main/drivers/resman/NVIDIA_kernel.spec#22 $

    #

    %define RELEASE 4496

    %define CUSTOM_RELEASE 4496

    %define rel %{?CUSTOM_RELEASE} %{!?CUSTOM_RELEASE:%RELEASE}

    %define ver 1.0

    %define nam NVIDIA_kernel

     

    Summary: NVIDIA kernel module for NVIDIA Architecture support.

    Name: NVIDIA_multimedia_kernel

    Version: %{ver}mdk

    Release: %rel

    Copyright: NVIDIA Corp. 2000

    Group: User Interface/X Hardware Support

    Source: ftp://ftp1.detonator.nvidia.com/pub/drive...RELEASE}.tar.gz

    URL: http://www.nvidia.com

    Vendor: NVIDIA Corp.

    BuildRoot: %{_tmppath}/%{name}-%{PACKAGE_VERSION}

    Packager: Buildmeister

    Requires: kernel >= 2.2.0

    Requires: rpm >= 3.0.4

    Requires: perl

    Buildrequires: kernel-multimedia-source

     

    %description

    NVIDIA Architecture support for systems with updated or custom kernels.

     

    %prep

    %setup -q -n %{nam}-%{ver}-${RPM_PACKAGE_RELEASE}

     

    %build

    # don't exit immediately when something bad happens.

    set +e

     

    # building an rpm from an srpm does not check the requires field.

    # make sure that rpm is good enough for us.

    RPMVERSION=`rpm -q --queryformat "%{VERSION}" rpm`

    RPMMAJOR=`echo $RPMVERSION | awk -F . '{print $1;}'`

    RPMMINOR=`echo $RPMVERSION | awk -F . '{print $2;}'`

    RPMPATCH=`echo $RPMVERSION | awk -F . '{print $3;}'`

    if [ $RPMMAJOR -le 3 -a $RPMMINOR -le 0 -a $RPMPATCH -lt 4 ]; then

    echo -e "nNeed rpm version 3.0.4 or greatern";

    exit 1;

    fi

     

    make nvidia.o

     

    # This will install the module itself onto the user's system, but not

    # load it into the running system. This will allow our auto-builds to

    # execute properly

    %install

     

    # create a file list for nvidia.o, to make sure the path is correct

    # it really should be under $RPM_BUILD_ROOT, but the %files section

    # does not honor it. Bummer.

    rm -f /tmp/files.lst

     

    # allow a build script to override the targetted kernel

    # otherwise default to current running kernel

    if [ -z "$TARGET_KERNEL" ]; then

    export TARGET_KERNEL=`uname -r`

    fi

     

    if [ -d $RPM_ROOT/lib/modules/$TARGET_KERNEL/kernel ]; then

    INSTALLPATH=/lib/modules/$TARGET_KERNEL/kernel/drivers/video

    else

    INSTALLPATH=/lib/modules/$TARGET_KERNEL/video

    fi

    mkdir -p $RPM_BUILD_ROOT/$INSTALLPATH

    install -m 0444 nvidia.o $RPM_BUILD_ROOT/$INSTALLPATH

    echo "%attr(444 root root) " $INSTALLPATH/nvidia.o > /tmp/files.lst

    unset RPM_BUILD_ROOT # trick RPM 4.0 into not stripping us

     

    %clean

    [ -n "$RPM_BUILD_ROOT" -a "$RPM_BUILD_ROOT" != / ] && rm -rf $RPM_BUILD_ROOT

     

    # Old versions of the tarball Makefile would install NVdriver in the

    # wrong directory. Remove the old NVdriver, if that leaves it parent

    # directory empty remove it as well. Note that we always install the

    # nvidia.o module in the correct directory, so we don't need to worry

    # about it here.

    %pre

    WRONGDIR=/lib/modules/`uname -r`/kernel/video

     

    if [ -d $WRONGDIR ]; then

    rm -f $WRONGDIR/NVdriver

    rmdir --ignore-fail-on-non-empty $WRONGDIR

    fi

     

     

    # In %post we basically do "run-time" installation

    # Note that our files are installed onto the system, and the packages

    # are cleaned up and gone. There are no Makefiles or fancy environment

    # variables to play with. I basically repeated the needed parts of the

    # install.sh script here

    %post

     

    # unload it quietly if already loaded..

    /sbin/rmmod NVdriver >& /dev/null

    /sbin/rmmod nvidia >& /dev/null

     

    rmmod_failed=0

    /sbin/lsmod | grep nvidia >& /dev/null && rmmod_failed=1

    /sbin/lsmod | grep NVdriver >& /dev/null && rmmod_failed=1

     

    if [ $rmmod_failed -eq 1 ]; then

    echo

    echo "Unable to remove existing NVIDIA kernel module."

    echo "Please be sure you have exited X before attempting"

    echo "to install the NVIDIA_kernel rpm."

    echo

    exit 1

    fi

     

    # delete the old NVdriver

    # XXX is there a better way to do this?

    if [ -z "$TARGET_KERNEL" ]; then

    export TARGET_KERNEL=`uname -r`

    fi

    if [ -d $RPM_ROOT/lib/modules/$TARGET_KERNEL/kernel ]; then

    INSTALLPATH=/lib/modules/$TARGET_KERNEL/kernel/drivers/video

    else

    INSTALLPATH=/lib/modules/$TARGET_KERNEL/video

    fi

    rm -f $INSTALLPATH/NVdriver

     

    function error {

    echo "$(basename $0): fatal error, $1 failed"

    exit 1

    }

     

    modconf=""

    tmp=`mktemp -q /tmp/nvidia.XXXXXX` || error "mktemp"

     

    paths[0]=/etc/conf.modules

    paths[1]=/etc/modules.conf

    paths[2]=/etc/modutils/aliases

     

    for path in ${paths[@]}; do

    test -f $path && modconf=$path

    done

     

    if [ ! -z $modconf ]; then

    # Initialize the permissions on $tmp so that we don't change the

    # permissions of $modconf when we mv it into place

    cp -p $modconf $tmp

    sed '/^alias.*(NVdriver|nvidia)/d' < $modconf > $tmp

    if [ -c /dev/.devfsd ]; then

    echo "alias /dev/nvidia* nvidia" >> $tmp

    else

    echo "alias char-major-195 nvidia" >> $tmp

    fi

    mv -f $tmp $modconf

    test -x /sbin/update-modules && /sbin/update-modules

    else

    if [ -f /etc/rc.d/rc.modules ]; then

    # Initialize the permissions on $tmp so that we don't change the

    # permissions of /etc/rc.d/rc.modules when we mv it into place

    cp -p /etc/rc.d/rc.modules $tmp

    sed '/.*(NVdriver|nvidia).*/d' < /etc/rc.d/rc.modules > $tmp

    echo "/sbin/modprobe nvidia" >> $tmp

    mv -f $tmp /etc/rc.d/rc.modules

    fi

    fi

     

    if [ ! -c /dev/.devfsd ]; then

    for i in 0 1 2 3; do

    node="/dev/nvidia$i"

    rm -f $node

    mknod $node c 195 $i || error "mknod "$node""

    chmod 0666 $node || error "chmod "$node""

    done

    node="/dev/nvidiactl"

    rm -f $node

    mknod $node c 195 255 || error "mknod "$node""

    chmod 0666 $node || error "chmod "$node""

    fi

     

    # Add it to the module dependency list.

    /sbin/depmod -a && /sbin/modprobe nvidia

     

    # Check to see if the module is actually loaded

    if ! /sbin/lsmod | grep nvidia >& /dev/null ; then

    echo

    echo "Failed to install nvidia.o"

    echo

    exit 1

    fi

     

    # It worked

    echo

    echo nvidia.o installed successfully

     

    perl -pi -e "s|Driver "nv"|Driver "nvidia"|" /etc/X11/XF86Config-4

     

    echo XF86Config-4 file updated

     

    echo

     

    exit 0

     

    %preun

     

    perl -pi -e "s|Driver "nvidia"|Driver "nv"|" /etc/X11/XF86Config-4

     

    echo XF86Config-4 file updated

     

    if [ $1 = 0 ] ; then

    #

    # unload it quietly if already loaded..

    #

    # Only unload if unused, otherwise this scriptlet fails and

    # RPM won't continue with uninstallation. So we also check

    # if the usage count is zero.

    #

    if [ x`/sbin/lsmod | grep nvidia | tr -s " " | cut -f 3 -d " "` == "x0" ]; then

    /sbin/rmmod nvidia >& /dev/null

    fi

    fi

     

     

     

    %files -f /tmp/files.lst

     

    %changelog

    * Wed Jul 30 2003 Torbjorn Turpeinen <tobbe@nyvalls.se>

    - Updated to latest version

     

    * Sun Jan 05 2003 Joseph Kain <jkain@nvidia.com>

    - Correctly preserve permissions on /etc/rc.d/rc.modules.

    - Pass "-f" option to mv.

    - Fix typos.

     

    * Fri Jan 03 2003 Joseph Kain <jkain@nvidia.com>

    - Preserve permissions on modules conf file.

     

    * Thu Nov 07 2002 Joseph Kain <jkain@nvidia.com>

    - Suppress lsmod output

     

    * Fri Oct 11 2002 Andy Ritger <aritger@nvidia.com>

    - Check that the module is loaded before reporting success.

     

    * Fri Sep 06 2002 Gareth Hughes <gareth@nvidia.com>

    - Change NVdriver to nvidia.o everywhere.

     

    * Mon Nov 26 2001 Joseph Kain <jkain@nvidia.com>

    - Use %{_tmppath} instead of hardcoding /var/tmp

     

    * Tue Aug 24 2001 Joseph Kain <jkain@nvidia.com>

    - in preun check usage count of NVdriver before trying to unload.

     

    * Thu Aug 31 2000 Terence Ripperda <tripperda@nvidia.com>

    - allow build scripts to specify a kernel version via TARGET_KERNEL variable

    otherwise fallback to `uname -r`

    - when searching for agpgart module, search in RPM_BUILD_ROOT, so we don't

    pick up an errant symbol on a build machine.

     

    * Tue Aug 15 2000 Mark Cooke <mpc@star.sr.bham.ac.uk>

    - Change permissions on NVdriver to 444 to avoid symbol-stripping issues

    with versions of RPM after 3.0.4

    - Add a test to make sure the NVdriver registers correctly.

     

    * Wed Aug 02 2000 Terence Ripperda <tripperda@nvidia.com>

    - regress use of /proc/devices to get major number

     

    * Tue May 02 2000 Terence Ripperda <tripperda@nvidia.com>

    - regress use of "make install" in post, no Makefile present

     

    * Fri Apr 27 2000 Nick Triantos <nick@nvidia.com>

    - Use "NVdriver" and "install" targets on make

    - Remove BuildReq item from header, was causing build error

     

    * Thu Apr 27 2000 Gregory McLean <gregm@comstar.net>

    - Cleaned out some redundant parts of the spec file.

    - Set the buildroot.

    - Made sure the preun gets called properly.

    - Added a %clean section to keep building machine tidy.

    - Set up logic for epoc builds if needed.

×
×
  • Create New...