diff --git a/contrib/pkginstaller/Makefile b/contrib/pkginstaller/Makefile index 4e76482a64..f88d5e7a4f 100644 --- a/contrib/pkginstaller/Makefile +++ b/contrib/pkginstaller/Makefile @@ -1,6 +1,11 @@ SHELL := bash ARCH ?= aarch64 +ifeq ($(ARCH), aarch64) + GOARCH:=arm64 +else + GOARCH:=$(ARCH) +endif GVPROXY_VERSION ?= 0.4.0 QEMU_VERSION ?= 7.1.0-1 GVPROXY_RELEASE_URL ?= https://github.com/containers/gvisor-tap-vsock/releases/download/v$(GVPROXY_VERSION)/gvproxy-darwin @@ -8,7 +13,7 @@ QEMU_RELEASE_URL ?= https://github.com/containers/podman-machine-qemu/releases/d PACKAGE_DIR ?= out/packaging TMP_DOWNLOAD ?= tmp-download PACKAGE_ROOT ?= root -PKG_NAME := podman-installer-macos-$(ARCH).pkg +PKG_NAME := podman-installer-macos-$(GOARCH).pkg default: pkginstaller diff --git a/contrib/pkginstaller/package.sh b/contrib/pkginstaller/package.sh index f6f7cef168..48d3a85a18 100755 --- a/contrib/pkginstaller/package.sh +++ b/contrib/pkginstaller/package.sh @@ -17,10 +17,6 @@ arch=$(cat "${BASEDIR}/ARCH") function build_podman() { pushd "$1" - local goArch="${arch}" - if [ "${goArch}" = aarch64 ]; then - goArch=arm64 - fi make GOARCH="${goArch}" podman-remote HELPER_BINARIES_DIR="${HELPER_BINARIES_DIR}" make GOARCH="${goArch}" podman-mac-helper cp bin/darwin/podman "contrib/pkginstaller/out/packaging/${binDir}/podman" @@ -66,6 +62,11 @@ function signQemu() { --entitlements "${BASEDIR}/hvf.entitlements" "${qemuBinDir}/qemu-system-${qemuArch}" } +goArch="${arch}" +if [ "${goArch}" = aarch64 ]; then + goArch=arm64 +fi + build_podman "../../../../" sign "${binDir}/podman" sign "${binDir}/gvproxy" @@ -86,7 +87,7 @@ productbuild --distribution "${BASEDIR}/Distribution" \ rm "${OUTPUT}/podman.pkg" if [ ! "${NO_CODESIGN}" -eq "1" ]; then - productsign --timestamp --sign "${PRODUCTSIGN_IDENTITY}" "${OUTPUT}/podman-unsigned.pkg" "${OUTPUT}/podman-installer-macos-${arch}.pkg" + productsign --timestamp --sign "${PRODUCTSIGN_IDENTITY}" "${OUTPUT}/podman-unsigned.pkg" "${OUTPUT}/podman-installer-macos-${goArch}.pkg" else - mv "${OUTPUT}/podman-unsigned.pkg" "${OUTPUT}/podman-installer-macos-${arch}.pkg" + mv "${OUTPUT}/podman-unsigned.pkg" "${OUTPUT}/podman-installer-macos-${goArch}.pkg" fi