diff --git a/resources/macos/make_pkg.sh b/resources/macos/make_pkg.sh index b9bc5efe..1d12f294 100755 --- a/resources/macos/make_pkg.sh +++ b/resources/macos/make_pkg.sh @@ -26,7 +26,7 @@ mkdir -p pkg/root/usr/local/bin pkg/comp cp -r $SOURCE_DIR pkg/root/usr/local/ (cd pkg/root/usr/local/bin && ln -s ../ykman/ykman) -pkgbuild --root="pkg/root" --identifier "com.yubico.yubikey-manager" --version "$RELEASE_VERSION" "pkg/comp/ykman.pkg" +pkgbuild --root="pkg/root" --scripts="pkg_scripts" --identifier "com.yubico.yubikey-manager" --version "$RELEASE_VERSION" "pkg/comp/ykman.pkg" productbuild --package-path "pkg/comp" --distribution "distribution.xml" "$PKG" diff --git a/resources/macos/pkg_scripts/preinstall b/resources/macos/pkg_scripts/preinstall new file mode 100755 index 00000000..5d0603a4 --- /dev/null +++ b/resources/macos/pkg_scripts/preinstall @@ -0,0 +1,4 @@ +#!/bin/sh + +# Delete existing installation +rm -rf /usr/local/ykman