2021-03-12 11:20:47 +00:00
#!/bin/bash
set -eu
if [ ! -f ../rba/deploy/macos/notarize.sh ] ; then
echo "need notarize script in ../rba/deploy/macos"
fi
version = $( grep '^ *version:' meson.build | head -1 | sed " s/^.*'\([0-9][0-9.]*\)'.* $/\1/ " )
echo
echo " Packaging command-line utility for Mac for Rubber Band v $version ... "
echo
2021-06-07 13:47:57 +01:00
if [ -f /usr/local/lib/libsndfile.dylib ] ; then
echo "(WARNING: libsndfile dynamic library found in /usr/local/lib, be sure that you aren't about to combine this external dependency with the hardened runtime)"
fi
2021-03-12 11:20:47 +00:00
rm -rf build
PKG_CONFIG_PATH = /usr/local/lib/pkgconfig/ meson build --cross-file ./cross/macos-universal.txt
ninja -C build
2021-06-07 13:47:57 +01:00
echo
echo " Check the following version number: it should read $version "
2021-03-12 11:20:47 +00:00
./build/rubberband -V
2021-06-07 13:47:57 +01:00
echo
2021-03-12 11:20:47 +00:00
key = "Developer ID Application: Particular Programs Ltd (73F996B92S)"
mkdir -p packages
( cd build
codesign -s " $key " -fv --options runtime rubberband
zipfile = " rubberband- $version -gpl-executable-macos.zip "
rm -f " $zipfile "
ditto -c -k rubberband " $zipfile "
../../rba/deploy/macos/notarize.sh " $zipfile " com.breakfastquay.rubberband
)
package_dir = " rubberband- $version -gpl-executable-macos "
rm -rf " $package_dir "
mkdir " $package_dir "
cp build/rubberband " $package_dir "
cp CHANGELOG README.md COPYING " $package_dir "
tar cvjf " $package_dir .tar.bz2 " " $package_dir "
mv " $package_dir .tar.bz2 " packages/
rm -rf " $package_dir "
echo
echo " Done, package is in packages/ $package_dir .tar.bz2 "