Package: nvidia-kernel-source Version: 1.0.7167-1 Severity: wishlist Tags: patch
I use and like this package, but its installation requires users to repeat the same painstaking work for every install. Attached is a patch in which the following code is added to the README.Debian file, along with some rewording. With some 'if...fi' clauses (to make sure each step worked) it might be suitable for an automatic install. 1 BL=/usr/src # set this to your build location 2 cd "$BL" 3 tar xzvf nvidia-kernel-source.tar.gz -C "$BL" # (It will install in $BL/modules) 4 CVERS=`grep -m 1 "^nvidia-kernel " "$BL/modules/nvidia-kernel/debian/changelog | sed 's/.*(\(.*\)) 5 export KVERS=`uname -r` # For example $KVERS might be 2.4.21-4-k7 6 apt-get install kernel-headers-$KVERS 7 export KSRC=/usr/src/kernel-headers-$KVERS 8 cd "$BL"/modules/nvidia-kernel 9 debian/rules binary_modules 10 apt-get install nvidia-kernel-common 11 dpkg -i ../nvidia-kernel-$KVERS_$CVERS*.deb Notes: More variable names, all the user has to change is #1, the rest should be automatic. In #4 CVERS gets the minor code version from the first line of the 'debian/changelog', for use in #11. The code is only for "METHOD #1 Using a kernel-headers package", not "METHOD #2: Using your own kernel source headers", but it wouldn't be hard to adapt. I've left most of the README as it was -- "METHOD #1" is still described in 7 steps, with comments. The above code is appended somewhat redundantly. Surely NOT the best way to present this -- I changed as little as possible, erring on the side of caution. Questions & comments are welcome, and I'd be glad to change or add code on request. It's more a "proof of concept" than a finished product. Hope this helps... -- System Information: Debian Release: 3.1 APT prefers unstable APT policy: (500, 'unstable'), (1, 'experimental') Architecture: i386 (i686) Kernel: Linux 2.6.9-1-686 Locale: LANG=C, LC_CTYPE=C (charmap=ANSI_X3.4-1968) (ignored: LC_ALL set to C) Versions of packages nvidia-kernel-source depends on: ii debhelper 4.2.31 helper programs for debian/rules ii dpatch 2.0.10 patch maintenance system for Debia ii make 3.80-9 The GNU version of the "make" util ii sed 4.1.4-2 The GNU sed stream editor -- no debconf information
60,64c60,65 < 1. cd /usr/src < tar xzvf nvidia-kernel-source.tar.gz -C <YOUR BUILD LOCATION> < (It will install in <YOU BUILD LOCATION>/modules) < - or - < tar xzvf nvidia-kernel-source.tar.gz (if building in /usr/src) --- > > 1. BL=/usr/src # set this to your build location > cd "$BL" > tar xzvf nvidia-kernel-source.tar.gz -C "$BL" # (It will install in > $BL/modules) > # get the code version from the changelog > export CVERS=`grep -m 1 "^nvidia-kernel " > "$BL/modules/nvidia-kernel/debian/changelog | sed 's/.*(\(.*\)).*/\1/'` 70c71 < uname -r For example: 2.4.21-4-k7 --- > export KVERS=`uname -r` # For example $KVERS might be 2.4.21-4-k7 72c73 < 3. Download and install package: kernel-headers-2.4.21-4-k7 --- > 3. Download and install package: kernel-headers-$KVERS 75c76,78 < Make sure your kernel image and headers have matching release numbers to --- > apt-get install kernel-headers-$KVERS > > Your kernel image and headers must have matching release numbers to 78c81 < 4. Set some environment variables (if bash is your shell): --- > 4. Set an environmental variable (if bash is your shell): 80,81c83 < export KSRC=/usr/src/kernel-headers-2.4.21-4-k7 < export KVERS=2.4.21-4-k7 --- > export KSRC=/usr/src/kernel-headers-$KVERS 85c87 < cd <YOUR BUILD LOCATION>/modules/nvidia-kernel --- > cd "$BL"/modules/nvidia-kernel 88,90d89 < (You can also combine step 4 and 5 into one line: < KSRC=/usr/src/kernel-headers-2.4.21-4-k7 KVERS=2.4.21-4-k7 debian/rules binary_modules) < 98,99c97,112 < dpkg -i ../nvidia-kernel-2.4.21-4-k7_1.0.7167-1+_.Custom_i386.deb < ( or similar filename ) --- > dpkg -i ../nvidia-kernel-$KVERS_$CVERS*.deb > > Steps #1-7 above for a standard install, suitable for cutting > and pasting: > > BL=/usr/src # set this to your build location > cd "$BL" > tar xzvf nvidia-kernel-source.tar.gz -C "$BL" # (It will install in > $BL/modules) > CVERS=`grep -m 1 "^nvidia-kernel " > "$BL/modules/nvidia-kernel/debian/changelog | sed 's/.*(\(.*\)).*/\1/'` > export KVERS=`uname -r` # For example $KVERS might be 2.4.21-4-k7 > apt-get install kernel-headers-$KVERS > export KSRC=/usr/src/kernel-headers-$KVERS > cd "$BL"/modules/nvidia-kernel > debian/rules binary_modules > apt-get install nvidia-kernel-common > dpkg -i ../nvidia-kernel-$KVERS_$CVERS*.deb