diff mbox series

[2/8,B,SRU,L-R-M] UBUNTU: [Packaging] fix-filenames -- build during build phase

Message ID 20200529143751.2218526-7-alberto.milone@canonical.com
State New
Headers show
Series Add signed modules for the new NVIDIA -server drivers | expand

Commit Message

Alberto Milone May 29, 2020, 2:37 p.m. UTC
From: Andy Whitcroft <apw@canonical.com>

Currently we build this during the clean phase which means you end up
with a source package build host version not a native version.  Build
during the dh_prep phase.

Signed-off-by: Andy Whitcroft <apw@canonical.com>
Signed-off-by: Seth Forshee <seth.forshee@canonical.com>
---
 debian/rules | 7 +++++--
 1 file changed, 5 insertions(+), 2 deletions(-)
diff mbox series

Patch

diff --git a/debian/rules b/debian/rules
index 61f6af2..7e16d56 100755
--- a/debian/rules
+++ b/debian/rules
@@ -37,9 +37,9 @@  pre-clean:
 PHONY: pre-clean
 
 debian/scripts/fix-filenames: debian/scripts/fix-filenames.c
-	cc -o $@ $^
+	$(CC) -o $@ $^
 
-clean:: pre-clean debian/scripts/fix-filenames
+clean:: pre-clean
 
 %:
 	dh $@
@@ -106,5 +106,8 @@  prepare-dkms:
 	mkdir -p $(dkms_dir)
 	ln -s /usr/src $(dkms_dir)/headers
 
+override_dh_prep: debian/scripts/fix-filenames
+	dh_prep
+
 override_dh_auto_install: prepare-dkms $(flavours)
 	dh_install