Package: nvidia-graphics-drivers
Version: 1.0.8178
Severity: wishlist
Tags: patch
Hi,
when running a 32bit userspace on amd64 it can be quit convenient to
have i386 and amd64 modules sources both unpacked under
/usr/src/modules (e.g. when you switch between 32bit and
64bit kernels). This patch simply renames the tarballs to
nvidia-kernel-$(ARCH)-source.tar.gz and the module source dirs to
/usr/src/modules/nvidia-kernel-$(ARCH)/.
We're using this to build i386 and amd64 kernels in one run on our build
farm. An additional benefit is that's it's quiet obvious from the
source dir name if the directory contains the x86_64 precompiled object
file or the i386 one.
Can this be applied?
Cheers,
-- Guido
-- System Information:
Debian Release: testing/unstable
APT prefers unstable
APT policy: (500, 'unstable'), (500, 'stable')
Architecture: powerpc (ppc)
Shell: /bin/sh linked to /bin/bash
Kernel: Linux 2.6.15
Locale: LANG=de_DE.UTF-8, LC_CTYPE=de_DE.UTF-8 (charmap=UTF-8)
--- ../orig/nvidia-graphics-drivers-1.0.8178/debian/rules 2006-01-19
10:19:58.000000000 +0100
+++ debian/rules 2006-01-19 10:53:41.000000000 +0100
@@ -21,6 +21,9 @@
url:=$(shell sh debian/upstream_info URL)
dirname:=$(shell sh debian/upstream_info DIRNAME)
filename:=$(shell sh debian/upstream_info FILENAME)
+# we add the architecture to the modules source directory so we can install the
+# i386 and amd64 source in parallel for multiarch builds
+kernelsource=nvidia-kernel-$(DEB_BUILD_ARCH)
AUTOGEN=debian/nvidia-kernel-source.README.Debian debian/control \
debian/copyright debian/nvidia-glx.links debian/nvidia-glx-dev.links \
@@ -32,7 +35,6 @@
-
CFLAGS = -Wall -g
ifneq (,$(findstring noopt,$(DEB_BUILD_OPTIONS)))
@@ -84,9 +86,9 @@
dh_testdir
# build kernel module source tarball
- mkdir -p $(CURDIR)/debian/temp/modules/nvidia-kernel/debian
- mkdir -p $(CURDIR)/debian/temp/modules/nvidia-kernel/nv
- cp -r $(CURDIR)/debian.binary/*
$(CURDIR)/debian/temp/modules/nvidia-kernel/debian
+ mkdir -p $(CURDIR)/debian/temp/modules/$(kernelsource)/debian
+ mkdir -p $(CURDIR)/debian/temp/modules/$(kernelsource)/nv
+ cp -r $(CURDIR)/debian.binary/*
$(CURDIR)/debian/temp/modules/$(kernelsource)/debian
for f in `ls $(CURDIR)/debian.binary` ; do \
perl -p \
@@ -95,14 +97,14 @@
-e 's{#VERSION#}{$(version)}g;' \
-e 's{#UPSTREAMVERSION#}{$(upstreamversion)}g;' \
-e 's{#URL#}{$(url)}g' \
- < $(CURDIR)/debian.binary/$$f >
$(CURDIR)/debian/temp/modules/nvidia-kernel/debian/$$f ; \
- chmod 0644
$(CURDIR)/debian/temp/modules/nvidia-kernel/debian/$$f ; \
+ < $(CURDIR)/debian.binary/$$f >
$(CURDIR)/debian/temp/modules/$(kernelsource)/debian/$$f ; \
+ chmod 0644
$(CURDIR)/debian/temp/modules/$(kernelsource)/debian/$$f ; \
done
- chmod 755
$(CURDIR)/debian/temp/modules/nvidia-kernel/debian/patches
- cp $(CURDIR)/$(dirname)/usr/src/nv/*
$(CURDIR)/debian/temp/modules/nvidia-kernel/nv || true
- chmod 755 $(CURDIR)/debian/temp/modules/nvidia-kernel/debian/rules
+ chmod 755
$(CURDIR)/debian/temp/modules/$(kernelsource)/debian/patches
+ cp $(CURDIR)/$(dirname)/usr/src/nv/*
$(CURDIR)/debian/temp/modules/$(kernelsource)/nv || true
+ chmod 755 $(CURDIR)/debian/temp/modules/$(kernelsource)/debian/rules
chown -R root:src $(CURDIR)/debian/temp/modules
- tar -zcvf $(CURDIR)/nvidia-kernel-source.tar.gz -C
$(CURDIR)/debian/temp modules
+ tar -zcvf $(CURDIR)/$(kernelsource)-source.tar.gz -C
$(CURDIR)/debian/temp modules
rm -rf debian/temp
touch build-kernel-stamp
@@ -113,7 +115,7 @@
rm -f build-stamp build-kernel-stamp configure-stamp
dh_clean
- rm -fr $(dirname) nvidia-kernel-source.tar.gz
+ rm -fr $(dirname) nvidia-kernel-*-source.tar.gz
@@ -124,7 +126,7 @@
dh_clean -k
dh_installdirs
- install -m 644 $(CURDIR)/nvidia-kernel-source.tar.gz
$(CURDIR)/debian/nvidia-kernel-source/usr/src
+ install -m 644 $(CURDIR)/$(kernelsource)-source.tar.gz
$(CURDIR)/debian/nvidia-kernel-source/usr/src
install -m 0644 $(dirname)/usr/X11R6/lib/modules/drivers/nvidia_drv.o \