[pkg-nvidia-devel] r825 - in /packages/nvidia-graphics-drivers/trunk/debian: changelog rules

rra at users.alioth.debian.org rra at users.alioth.debian.org
Sun Apr 25 04:29:15 UTC 2010


Author: rra
Date: Sun Apr 25 04:29:11 2010
New Revision: 825

URL: http://svn.debian.org/wsvn/pkg-nvidia/?sc=1&rev=825
Log:
Simplify building nvidia-kernel-source

[ Andreas Beckmann ]
* debian/rules: rename target build-kernel-stamp to module-source-stamp,
  reindent, simplify and unify; do not require root for building the tarball

Modified:
    packages/nvidia-graphics-drivers/trunk/debian/changelog
    packages/nvidia-graphics-drivers/trunk/debian/rules

Modified: packages/nvidia-graphics-drivers/trunk/debian/changelog
URL: http://svn.debian.org/wsvn/pkg-nvidia/packages/nvidia-graphics-drivers/trunk/debian/changelog?rev=825&op=diff
==============================================================================
--- packages/nvidia-graphics-drivers/trunk/debian/changelog (original)
+++ packages/nvidia-graphics-drivers/trunk/debian/changelog Sun Apr 25 04:29:11 2010
@@ -51,6 +51,8 @@
   * debian.binary/control.template: rename to *.in
   * debian/rules: use same variable substitutions as for debian/*.in to create
     debian.binary/control.template
+  * debian/rules: rename target build-kernel-stamp to module-source-stamp,
+    reindent, simplify and unify; do not require root for building the tarball
 
  -- Russ Allbery <rra at debian.org>  Sat, 24 Apr 2010 20:35:20 -0700
 

Modified: packages/nvidia-graphics-drivers/trunk/debian/rules
URL: http://svn.debian.org/wsvn/pkg-nvidia/packages/nvidia-graphics-drivers/trunk/debian/rules?rev=825&op=diff
==============================================================================
--- packages/nvidia-graphics-drivers/trunk/debian/rules (original)
+++ packages/nvidia-graphics-drivers/trunk/debian/rules Sun Apr 25 04:29:11 2010
@@ -74,7 +74,7 @@
 
 
 .PHONY: build
-build: configure-stamp build-stamp
+build: configure-stamp build-stamp module-source-stamp
 
 .PHONY: build-stamp
 build-stamp:
@@ -83,51 +83,51 @@
 .PHONY: build-kernel
 build-kernel:
 
-.PHONY: build-kernel-stamp 
-build-kernel-stamp: $(AUTOGEN)
-	    dh_testroot
-	    dh_testdir
-
-	    # build kernel module source tarball
-	    mkdir -p $(CURDIR)/debian/temp/modules/nvidia-kernel/debian
-	    
-		# Prepare debian files for module package
-	    cp -a $(CURDIR)/debian.binary/* $(CURDIR)/debian/temp/modules/nvidia-kernel/debian
-	rm -f debian/temp/modules/nvidia-kernel/debian/*.in
-	cp -a debian/copyright $(CURDIR)/debian/temp/modules/nvidia-kernel/debian
-
-	    cp $(CURDIR)/$(dirname)/usr/src/nv/* $(CURDIR)/debian/temp/modules/nvidia-kernel/
-	cp -a $(CURDIR)/$(dirname)/usr/share/doc/NVIDIA_Changelog $(CURDIR)/debian/temp/modules/nvidia-kernel/
-
-		# We don't want these makefiles that don't work with kbuild
-		rm $(CURDIR)/debian/temp/modules/nvidia-kernel/makefile
-
-		# We want both 32 and 64 bit versions of nv-kernel.o
-	cp -a $(CURDIR)/NVIDIA-Linux-i386/usr/src/nv/nv-kernel.o $(CURDIR)/debian/temp/modules/nvidia-kernel/nv-kernel.o.i386
-	cp -a $(CURDIR)/NVIDIA-Linux-amd64/usr/src/nv/nv-kernel.o $(CURDIR)/debian/temp/modules/nvidia-kernel/nv-kernel.o.x86_64
-	rm -f $(CURDIR)/debian/temp/modules/nvidia-kernel/nv-kernel.o
-
-		# and then make Makefile.kbuild actually use our names
-		sed -i -e 's/nv-kernel.o$$/nv-kernel.o$$(NVARCH)/' $(CURDIR)/debian/temp/modules/nvidia-kernel/Makefile.kbuild
-
-		# We have new conftest files that work purely with kbuild and doesn't require root
-	    cp $(CURDIR)/Makefile $(CURDIR)/conftest.* $(CURDIR)/debian/temp/modules/nvidia-kernel/
-	    cp $(CURDIR)/patches.h $(CURDIR)/debian/temp/modules/nvidia-kernel/
-
-		# Fix permissions
+# build kernel module source tarball
+module-source-stamp: $(AUTOGEN)
+	dh_testdir
+
+	rm -rf debian/temp
+	mkdir -p debian/temp/modules/nvidia-kernel/debian
+
+	# Module source code
+	cp -a NVIDIA-Linux/usr/src/nv/* debian/temp/modules/nvidia-kernel/
+	cp -a NVIDIA-Linux/usr/share/doc/NVIDIA_Changelog debian/temp/modules/nvidia-kernel/
+
+	# We don't want this makefile that doesn't work with kbuild
+	rm debian/temp/modules/nvidia-kernel/makefile
+
+	# We want both 32 and 64 bit versions of nv-kernel.o
+	cp -a NVIDIA-Linux-i386/usr/src/nv/nv-kernel.o debian/temp/modules/nvidia-kernel/nv-kernel.o.i386
+	cp -a NVIDIA-Linux-amd64/usr/src/nv/nv-kernel.o debian/temp/modules/nvidia-kernel/nv-kernel.o.x86_64
+	rm -f debian/temp/modules/nvidia-kernel/nv-kernel.o
+
+	# and then make Makefile.kbuild actually use our names
+	sed -i -e 's/nv-kernel.o$$/nv-kernel.o$$(NVARCH)/' debian/temp/modules/nvidia-kernel/Makefile.kbuild
+
+	# We have new conftest files that work purely with kbuild and don't require root
+	cp -a Makefile conftest.* patches.h debian/temp/modules/nvidia-kernel/
+
+	# Prepare debian files for module package
+	cp -a debian.binary/* debian/temp/modules/nvidia-kernel/debian/
+	cp -a debian/copyright debian/temp/modules/nvidia-kernel/debian/
+
+	# Fix permissions
 	chmod -R a-sx,u=rwX,go=rX debian/temp/modules
-	chmod a+x $(CURDIR)/debian/temp/modules/nvidia-kernel/debian/rules
-	    chown -R root:src $(CURDIR)/debian/temp/modules
-	    
-	    tar -jcvf $(CURDIR)/nvidia-kernel.tar.bz2 -C $(CURDIR)/debian/temp modules
-	    rm -rf debian/temp 
-	    touch build-kernel-stamp
+	chmod a+x debian/temp/modules/nvidia-kernel/debian/rules
+
+	tar cfvj nvidia-kernel.tar.bz2 -C debian/temp --owner=root --group=src \
+		--exclude '*.in' --exclude '.svn' modules
+	tar tfvj nvidia-kernel.tar.bz2
+	rm -rf debian/temp
+	touch $@
+
 
 .PHONY: clean					
 clean: version-clean
 	dh_testdir
 	dh_testroot
-	rm -f build-stamp build-kernel-stamp configure-stamp
+	rm -f build-stamp module-source-stamp configure-stamp
 	dh_clean 
 
 	rm -f NVIDIA-Linux NVIDIA-Linux-i386 NVIDIA-Linux-amd64
@@ -138,7 +138,7 @@
 
 
 .PHONY: install
-install: build-stamp build-kernel-stamp
+install: build-stamp
 	dh_testdir
 	dh_testroot
 	dh_prep 
@@ -285,7 +285,7 @@
 
 # Build architecture dependant packages using the common target.
 .PHONY: binary-arch
-binary-arch: build-stamp build-kernel-stamp install
+binary-arch: build-stamp module-source-stamp install
 	$(MAKE) -f debian/rules binary-common
 
 .PHONY: binary




More information about the Pkg-nvidia-devel mailing list