From 0e37e1cf90fb83841e7a589a3c2d71447daa9f58 Mon Sep 17 00:00:00 2001 From: Sam Date: Mon, 31 Jul 2023 06:22:28 +1000 Subject: [PATCH] Correct homebrew path on arm macOS. By @sammcj (#1760) --- Makefile | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/Makefile b/Makefile index 7b6307b9..cb3e8279 100644 --- a/Makefile +++ b/Makefile @@ -5,12 +5,19 @@ VERSION := $(shell python -c "from src.vorta._version import __version__; print( .PHONY : help clean lint test .DEFAULT_GOAL := help +# Set Homebrew location to /opt/homebrew on Apple Silicon, /usr/local on Intel +ifeq ($(shell uname -m),arm64) + export HOMEBREW = /opt/homebrew +else + export HOMEBREW = /usr/local +endif + clean: rm -rf dist/* dist/Vorta.app: ## Build macOS app locally (without Borg) pyinstaller --clean --noconfirm package/vorta.spec - cp -R /usr/local/Caskroom/sparkle/*/Sparkle.framework dist/Vorta.app/Contents/Frameworks/ + cp -R ${HOMEBREW}/Caskroom/sparkle/*/Sparkle.framework dist/Vorta.app/Contents/Frameworks/ rm -rf build/vorta dist/vorta dist/Vorta.dmg: dist/Vorta.app ## Create notarized macOS DMG for distribution.