diff --git a/deb/common/rules b/deb/common/rules index 9a4c95229e..64ad8c937d 100755 --- a/deb/common/rules +++ b/deb/common/rules @@ -1,18 +1,20 @@ #!/usr/bin/make -f +# Include default Makefile variables. +include /usr/share/dpkg/default.mk + +# Build all armhf binaries as ARMv6 with hard float, to support both +# Debian armhf and Raspbian armhf. +ifeq ($(DEB_TARGET_ARCH),armhf) + export CFLAGS += -marm -march=armv6+fp + export GOARM := 6 +endif + VERSION ?= $(shell cat engine/VERSION) -TARGET_ARCH = $(shell dpkg-architecture -qDEB_TARGET_ARCH) # TODO(thaJeztah): allow passing this version when building. PKG_REVISION ?= 1 export PKG_REVISION -# FIXME: quick hardcoding of GOARM for raspbian; replace with a holistic -# refactoring of how we handle target architecture -distribution := $(shell . /etc/os-release; echo "$${ID}") -ifeq ($(distribution),raspbian) - export GOARM=6 -endif - # force packages to be built with xz compression, as Ubuntu 21.10 and up use # zstd compression, which is non-standard, and breaks 'dpkg-sig --verify' override_dh_builddeb: