Source: axmail Version: 2.9-2 Tags: patch upstream User: debian-cr...@lists.debian.org Usertags: ftcbfs
axmail fails to cross build from source, because it uses the build architecture compiler as linker via the LD variable. Unfortunately, the meaning of LD varies widely, so dh_auto_build cannot substitute it. I propose defaulting it to the compiler variable such that it automatically gets substituted correctly in most cases while still leaving room for choosing it manualy. Further more, axmail passes -s to install which causes it to stip with the wrong strip. Beyond breaking cross compilation, doing so also breaks DEB_BUILD_OPTIONS=nostrip as well as generation of -dbgsym packages. It is best to avoid -s entirely and leave that up to dh_strip. Indeed, debhelper already supports that by passing a non-stripping install as INSTALL, so all we need to do here is make install substitutable. Please consider applying the attached patch. Helmut
--- axmail-2.9.orig/Makefile +++ axmail-2.9/Makefile @@ -2,7 +2,8 @@ MAN_DIR = debian/axmail/usr/share/man CC = gcc -LD = gcc +LD = $(CC) +INSTALL ?= install # CFLAGS = -O2 -Wstrict-prototypes -g -I../lib LIBS = -lcrypt MODULES = utils.o config.o adduser.o command.o mailcmd.o mbox.o head.o lock.o axmail.o quit.o @@ -13,19 +14,19 @@ install: installbin installconf installhelp installbin: all - install -m 0755 -D -d debian/axmail/usr/sbin - install -m 0755 -s -o root -g root axmail debian/axmail/usr/sbin + $(INSTALL) -m 0755 -D -d debian/axmail/usr/sbin + $(INSTALL) -m 0755 -s -o root -g root axmail debian/axmail/usr/sbin installconf: - install -m 755 -D -d debian/axmail/etc/ax25 - install -m 755 -o root -g root -d debian/axmail/etc/ax25 - install -b -m 644 -o root -g root etc/axmail.conf debian/axmail/etc/ax25 - install -m 644 -o root -g root etc/welcome.txt debian/axmail/etc/ax25 + $(INSTALL) -m 755 -D -d debian/axmail/etc/ax25 + $(INSTALL) -m 755 -o root -g root -d debian/axmail/etc/ax25 + $(INSTALL) -b -m 644 -o root -g root etc/axmail.conf debian/axmail/etc/ax25 + $(INSTALL) -m 644 -o root -g root etc/welcome.txt debian/axmail/etc/ax25 installhelp: - install -m 755 -D -d debian/axmail/var/lib/ax25/axmail/help - install -m 755 -o root -g root -d debian/axmail/var/lib/ax25/axmail/help - install -m 644 -o root -g root etc/help/*.hlp debian/axmail/var/lib/ax25/axmail/help + $(INSTALL) -m 755 -D -d debian/axmail/var/lib/ax25/axmail/help + $(INSTALL) -m 755 -o root -g root -d debian/axmail/var/lib/ax25/axmail/help + $(INSTALL) -m 644 -o root -g root etc/help/*.hlp debian/axmail/var/lib/ax25/axmail/help back: rm -f ../mail.tar.gz