Skip to content

Commit

Permalink
Merge pull request #1003 from neersighted/armhf
Browse files Browse the repository at this point in the history
debian: build armv6 binaries for armhf
  • Loading branch information
thaJeztah authored Mar 15, 2024
2 parents 6298c93 + df6192b commit a15b758
Showing 1 changed file with 10 additions and 8 deletions.
18 changes: 10 additions & 8 deletions deb/common/rules
Original file line number Diff line number Diff line change
@@ -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:
Expand Down

0 comments on commit a15b758

Please sign in to comment.