Source: gkrellm-thinkbat Version: 0.2.2-1 Tags: patch User: debian-cr...@lists.debian.org Usertags: ftcbfs
gkrellm-thinkbat fails to cross build from source, because it builds for the build architecture. dh_auto_build can be used to pass cross tools to make, but the Makefile still hard codes pkg-config. It also uses a build architecture strip via install -s. Doing so also breaks generation of -dbgsym packages as well as DEB_BUILD_OPTIONS=nostrip. It is best to defer all stripping to dh_strip. The attached patch fixes all mentioned issues. Please consider applying it. Helmut
diff -u gkrellm-thinkbat-0.2.2/Makefile gkrellm-thinkbat-0.2.2/Makefile --- gkrellm-thinkbat-0.2.2/Makefile +++ gkrellm-thinkbat-0.2.2/Makefile @@ -1,8 +1,10 @@ VERSION = 0.2.2 CC = gcc CFLAGS = -I. -Wall -pedantic -O2 -INCLUDE = `pkg-config gtk+-2.0 --cflags` -fPIC -DVERSION=\"$(VERSION)\" +PKG_CONFIG ?= pkg-config +INCLUDE = `$(PKG_CONFIG) gtk+-2.0 --cflags` -fPIC -DVERSION=\"$(VERSION)\" LFLAGS = -shared -lm +INSTALL ?= install INSTALLDIR = $(DESTDIR)/usr/lib/gkrellm2/plugins/ @@ -22,8 +24,8 @@ rm -f *.o gkrellm-thinkbat.so install : gkrellm-thinkbat.so - install -d $(INSTALLDIR) - install -c -s -m 644 gkrellm-thinkbat.so $(INSTALLDIR) + $(INSTALL) -d $(INSTALLDIR) + $(INSTALL) -c -s -m 644 gkrellm-thinkbat.so $(INSTALLDIR) dist : rm -rf gkrellm-thinkbat-$(VERSION) diff -u gkrellm-thinkbat-0.2.2/debian/rules gkrellm-thinkbat-0.2.2/debian/rules --- gkrellm-thinkbat-0.2.2/debian/rules +++ gkrellm-thinkbat-0.2.2/debian/rules @@ -22,7 +22,7 @@ build-stamp: configure-stamp dh_testdir - $(MAKE) + dh_auto_build touch $@ clean: @@ -37,7 +37,7 @@ dh_testroot dh_clean -k dh_installdirs - $(MAKE) DESTDIR=$(CURDIR)/debian/gkrellm-thinkbat install + dh_auto_install -- INSTALL='install --strip-program=true' # Build architecture-independent files here. binary-indep: build install diff -u gkrellm-thinkbat-0.2.2/debian/changelog gkrellm-thinkbat-0.2.2/debian/changelog --- gkrellm-thinkbat-0.2.2/debian/changelog +++ gkrellm-thinkbat-0.2.2/debian/changelog @@ -1,3 +1,13 @@ +gkrellm-thinkbat (0.2.2-1.1) UNRELEASED; urgency=medium + + * Non-maintainer upload. + * Fix FTCBFS: (Closes: #-1) + + Let dh_auto_build pass cross tools to make. + + Make pkg-config and install substitutable. + + Defer stripping to dh_strip by passing a non-stripping install. + + -- Helmut Grohne <hel...@subdivi.de> Fri, 03 Jan 2020 19:05:48 +0100 + gkrellm-thinkbat (0.2.2-1) unstable; urgency=low * Initial release (Closes: #470831)