Skip to content

Commit

Permalink
build: add rust triples to nfpm arch lookup to support new package ty…
Browse files Browse the repository at this point in the history
…pes in the future

Signed-off-by: Reuben Miller <[email protected]>
  • Loading branch information
reubenmiller committed Feb 11, 2024
1 parent d7e027d commit 08053cf
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions ci/build_scripts/package.sh
Original file line number Diff line number Diff line change
Expand Up @@ -189,11 +189,21 @@ build_virtual_package() {
}

get_package_arch() {
# Return package architecture as per the
# nfpm architectures defined here: https://nfpm.goreleaser.com/goarch-to-pkg/
# which uses the GOARCH to abstract across the different
# arch names used in different linux packages (e.g. deb != rpm != apk)
case "$1" in
x86_64-unknown-linux-*) pkg_arch=amd64 ;;
i686-unknown-linux-*) pkg_arch=386 ;;
aarch64-unknown-linux-*) pkg_arch=arm64 ;;
armv7-unknown-linux-*eabihf) pkg_arch=arm7 ;;
arm-unknown-linux-*eabihf) pkg_arch=arm6 ;;
arm-unknown-linux-*eabi) pkg_arch=arm5 ;;
armv5te-unknown-linux-*eabi) pkg_arch=arm5 ;;
riscv64gc-unknown-linux-*) pkg_arch=riscv64 ;;
mips64el-unknown-linux-*abi64) pkg_arch=mips64le ;;
mipsel-unknown-linux-*) pkg_arch=mipsle ;;
*)
echo "Unknown package architecture. value=$1"
exit 1
Expand Down

0 comments on commit 08053cf

Please sign in to comment.