Skip to content

Commit

Permalink
MACOS: build script improvements
Browse files Browse the repository at this point in the history
Signed-off-by: Stefan Westerfeld <[email protected]>
  • Loading branch information
swesterfeld committed Jun 23, 2024
1 parent 2d3486e commit eab19f4
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 7 deletions.
2 changes: 2 additions & 0 deletions macos/build-deps.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
8 changes: 6 additions & 2 deletions macos/build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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"
12 changes: 7 additions & 5 deletions macos/dist.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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 [email protected] --team-id ZA556HAPK8 --password "$APPLE_NOTARIZATION_PASSWORD" --wait
xcrun stapler staple SpectMorph-${PACKAGE_VERSION}.pkg

# over ssh: security unlock-keychain

0 comments on commit eab19f4

Please sign in to comment.