From 475f5558b9cb14923dd0bed364d7aafedb377e73 Mon Sep 17 00:00:00 2001 From: Markson Hon <50002150+MarksonHon@users.noreply.github.com> Date: Mon, 10 Jul 2023 13:46:53 +0800 Subject: [PATCH] pacman.rb: fix aarch64 & arm7hf --- lib/fpm/package/pacman.rb | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/lib/fpm/package/pacman.rb b/lib/fpm/package/pacman.rb index 4dbbd2eec1..f91782f35b 100644 --- a/lib/fpm/package/pacman.rb +++ b/lib/fpm/package/pacman.rb @@ -37,11 +37,15 @@ def initialize(*args) def architecture case @architecture when nil - return %x{uname -m}.chomp # default to current arch - when "amd64" # debian and pacman disagree on architecture names - return "x86_64" + return %x{uname -m}.chomp # default to current arch + when "amd64" # Debian uses amd64 + return "x86_64" # Arch Linux uses x86_64 + when "arm64" # Debian uses arm64 + return "aarch64" # Arch Linux ARM uses aarch64 + when "armhf" # Debian uses armhf + return "arm7hf" # Arch Linux ARM uses arm7hf when "native" - return %x{uname -m}.chomp # 'native' is current arch + return %x{uname -m}.chomp # 'native' is the current arch when "all", "any", "noarch" return "any" else