Consider DESTDIR in macos_sign.sh during install script

This commit is contained in:
Riccardo Schirone 2021-01-21 14:12:35 +01:00 committed by Riccardo Schirone
parent cf1fc682a7
commit 1173049e2b
2 changed files with 10 additions and 3 deletions

View file

@ -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}"

View file

@ -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