* Ad-hoc sign rizin binary with debugger entitlements on MacOS * Use re.rizin.rizin and move OSX pkg files in dist/osx * Use dist/osx/build_osx_package.sh to create OSX pkg with meson * Mention how to create OSX pkg in doc/PACKAGERS.md * Remove doc/macos.md
30 lines
No EOL
989 B
Bash
Executable file
30 lines
No EOL
989 B
Bash
Executable file
#!/bin/sh -eu
|
|
#
|
|
# Script to create a OSX .pkg file to install Rizin
|
|
|
|
VERSION=$(./sys/version.py)
|
|
RIZINDIR=$(pwd)
|
|
RIZININSTALL=/tmp/rizin-install
|
|
OSXPKGDIR=/tmp/osxpkgtmp
|
|
|
|
rm -rf buildtmp
|
|
mkdir buildtmp
|
|
meson buildtmp --buildtype=release -Duse_libuv=false -Denable_tests=false -Dlocal=disabled --prefix=/usr/local
|
|
rm -rf "${RIZININSTALL}"
|
|
DESTDIR="${RIZININSTALL}" ninja -C buildtmp install
|
|
rm -rf buildtmp
|
|
|
|
rm -rf "${OSXPKGDIR}"
|
|
mkdir "${OSXPKGDIR}"
|
|
cp -rv "${RIZINDIR}/dist/osx/rizin.unpkg/" "${OSXPKGDIR}/"
|
|
|
|
cd "${RIZININSTALL}" && find . | cpio -o --format odc | gzip -c > "${OSXPKGDIR}/Payload"
|
|
mkbom "${RIZININSTALL}" "${OSXPKGDIR}/Bom"
|
|
pkgutil --flatten "${OSXPKGDIR}" "${RIZINDIR}/dist/osx/rizin.pkg"
|
|
|
|
cd "${RIZINDIR}/dist/osx" && productbuild --resources Resources --distribution Distribution "rizin-${VERSION}.pkg"
|
|
mv "${RIZINDIR}/dist/osx/rizin-${VERSION}.pkg" "${RIZINDIR}/rizin-${VERSION}.pkg"
|
|
|
|
rm "${RIZINDIR}/dist/osx/rizin.pkg"
|
|
rm -rf "${OSXPKGDIR}"
|
|
rm -rf "${RIZININSTALL}" |