From eab19f44b5111c1459a13160f61c74fc54996300 Mon Sep 17 00:00:00 2001 From: Stefan Westerfeld Date: Sun, 23 Jun 2024 23:38:08 +0200 Subject: [PATCH] MACOS: build script improvements Signed-off-by: Stefan Westerfeld --- macos/build-deps.sh | 2 ++ macos/build.sh | 8 ++++++-- macos/dist.sh | 12 +++++++----- 3 files changed, 15 insertions(+), 7 deletions(-) diff --git a/macos/build-deps.sh b/macos/build-deps.sh index aaacf0b4..7cc1c588 100755 --- a/macos/build-deps.sh +++ b/macos/build-deps.sh @@ -52,6 +52,8 @@ MAKEFLAGS="-j9" PATH=$PWD/prefix/bin:$PATH export PKG_CONFIG_PATH=$PREFIX/lib/pkgconfig:$PKG_CONFIG_PATH export PKG_CONFIG="pkg-config --static" +export CC="ccache clang" +export CXX="ccache clang++" if [ "x$2" = "xclean" ]; then rm -rf $PREFIX $BUILDD diff --git a/macos/build.sh b/macos/build.sh index 2118bd13..a9d9597e 100755 --- a/macos/build.sh +++ b/macos/build.sh @@ -40,5 +40,9 @@ if [ "x$2" = "xclean" ]; then make -C.. clean || die "make clean failed" fi -make -j9 -C.. || die "make failed" -make -C.. install || die "make install failed" +cd .. +make -j9 || die "make failed" +make -j9 check || die "make check failed" +make install || die "make install failed" +cd tests +./post-install-test.sh || die "post install test failed" diff --git a/macos/dist.sh b/macos/dist.sh index 8c8bb36a..0f73134c 100755 --- a/macos/dist.sh +++ b/macos/dist.sh @@ -12,13 +12,13 @@ set -e source config.sh -# CHECK INSTRUMENT VERSION -echo -n "### Instruments: " -grep "version \"$PACKAGE_VERSION\"" instruments/standard/index.smindex || die "did not use appropriate instrument version: $PACKAGE_VERSION" - SMDIR=spectmorph SMDIR_CROSS=../../cross/spectmorph/macos/spectmorph +# CHECK INSTRUMENT VERSION +echo -n "### Instruments: " +grep "version \"$PACKAGE_VERSION\"" $SMDIR/share/spectmorph/instruments/standard/index.smindex || die "did not use appropriate instrument version: $PACKAGE_VERSION" + make_pkg() { SHORT=$1 @@ -56,7 +56,7 @@ pkgbuild --sign "Developer ID Installer: Stefan Westerfeld (ZA556HAPK8)" --root --identifier org.spectmorph.lv2.SpectMorph.pkg --version ${PACKAGE_VERSION} --install-location /Library/Audio/Plug-Ins/LV2 "SpectMorph.lv2.pkg" mkdir -p installer-tmp/SpectMorph.data/SpectMorph -cp -rv instruments installer-tmp/SpectMorph.data/SpectMorph || die "error: cp instruments" +cp -rv $SMDIR/share/spectmorph/instruments installer-tmp/SpectMorph.data/SpectMorph || die "error: cp instruments" cp -rv $PREFIX/share/spectmorph/templates installer-tmp/SpectMorph.data/SpectMorph || die "error: cp templates" pkgbuild --sign "Developer ID Installer: Stefan Westerfeld (ZA556HAPK8)" --root installer-tmp/SpectMorph.data --identifier "org.spectmorph.data.SpectMorph.pkg" --version ${PACKAGE_VERSION} --install-location "/tmp/SpectMorph.data" --scripts DataInstallerScript SpectMorph.data.pkg rm -rf installer-tmp/SpectMorph.data @@ -109,3 +109,5 @@ rm -rf installer-tmp SpectMorph.clap.pkg SpectMorph.lv2.pkg SpectMorph.vst.pkg S xcrun notarytool submit SpectMorph-${PACKAGE_VERSION}.pkg --apple-id stefan@space.twc.de --team-id ZA556HAPK8 --password "$APPLE_NOTARIZATION_PASSWORD" --wait xcrun stapler staple SpectMorph-${PACKAGE_VERSION}.pkg + +# over ssh: security unlock-keychain