Source: dvbackup
Version: 1:0.0.4-10
Tags: patch upstream
User: debian-cr...@lists.debian.org
Usertags: ftcbfs

dvbackup fails to cross build from source, because the upstream Makefile
hard codes the build architecture compiler (and strip executable). To
make it cross buildable, those need to be substituted. Since debhelper
automatically performs the substitution, all that is left here is making
them substitutable. Please consider applying the attached patch.

Helmut
--- dvbackup-0.0.4.orig/Makefile
+++ dvbackup-0.0.4/Makefile
@@ -1,3 +1,5 @@
+CC?=gcc
+STRIP?=strip
 #Flags for fast code:
 #CFLAGS=-Wall -O3 -mcpu=i686 -fomit-frame-pointer 
 CFLAGS=-Wall -O3 -fomit-frame-pointer 
@@ -13,16 +15,16 @@
 all: dvbackup dvconnect Makefile
 
 dvconnect: dvconnect.c Makefile
-	gcc $(CFLAGS) $(LDFLAGS) $(CPPFLAGS) -DHAVE_LIBPOPT -o dvconnect dvconnect.c -lpopt -lpthread
+	$(CC) $(CFLAGS) $(LDFLAGS) $(CPPFLAGS) -DHAVE_LIBPOPT -o dvconnect dvconnect.c -lpopt -lpthread
 
 dvbackup: dvbackup.c minilogo.c Makefile
-	gcc $(CFLAGS) $(LDFLAGS) $(CPPFLAGS) -I/usr/include -o dvbackup dvbackup.c minilogo.c -lpopt -lm -lz
+	$(CC) $(CFLAGS) $(LDFLAGS) $(CPPFLAGS) -I/usr/include -o dvbackup dvbackup.c minilogo.c -lpopt -lm -lz
 
 install: dvbackup dvconnect
 	install dvbackup $(install_dir)
 	install dvconnect $(install_dir)
-	strip $(install_dir)/dvconnect
-	strip $(install_dir)/dvbackup
+	$(STRIP) $(install_dir)/dvconnect
+	$(STRIP) $(install_dir)/dvbackup
 
 clean:
 	rm dvbackup

Reply via email to