From 1173049e2b7df124502c3cd46374678d5d6bdd03 Mon Sep 17 00:00:00 2001 From: Riccardo Schirone Date: Thu, 21 Jan 2021 14:12:35 +0100 Subject: [PATCH] Consider DESTDIR in macos_sign.sh during install script --- binrz/rizin/macos_sign.sh | 9 +++++++-- binrz/rizin/meson.build | 4 +++- 2 files changed, 10 insertions(+), 3 deletions(-) diff --git a/binrz/rizin/macos_sign.sh b/binrz/rizin/macos_sign.sh index 8a593f2116..526be89574 100755 --- a/binrz/rizin/macos_sign.sh +++ b/binrz/rizin/macos_sign.sh @@ -2,7 +2,12 @@ # # Helper script for the build process to apply entitlements -ENTITLEMENT="$1" -SRC="$2" +IS_INSTALL="$1" +ENTITLEMENT="$2" +SRC="$3" + +if [ "$IS_INSTALL" = "true" ] ; then + SRC="${MESON_INSTALL_DESTDIR_PREFIX}/${SRC}" +fi codesign --entitlements "${ENTITLEMENT}" --force -s - "${SRC}" diff --git a/binrz/rizin/meson.build b/binrz/rizin/meson.build index 0a8b601bf7..626bc83cd1 100644 --- a/binrz/rizin/meson.build +++ b/binrz/rizin/meson.build @@ -38,6 +38,7 @@ if host_machine.system() == 'darwin' build_always_stale: true, command: [ macos_sign_sh, + 'false', entitlements, rizin_exe.full_path(), ], @@ -47,7 +48,8 @@ if host_machine.system() == 'darwin' ) meson.add_install_script(meson.current_source_dir() / 'macos_sign.sh', + 'true', entitlements, - rizin_prefix / rizin_bindir / 'rizin', + rizin_bindir / 'rizin', ) endif \ No newline at end of file