|
|
|
#!@BASH@
|
|
|
|
|
|
|
|
set -ex
|
|
|
|
|
|
|
|
out_file="$1"
|
|
|
|
tarball="$2"
|
|
|
|
|
|
|
|
# prefix to install at, eg '/usr'
|
|
|
|
#prefix="$3"
|
|
|
|
|
|
|
|
private_dir="$3"
|
|
|
|
|
|
|
|
meson_bin="@MESON_BIN@"
|
|
|
|
zplugins_ver="@ZPLUGINS_VER@"
|
|
|
|
distro="@DISTRO@"
|
|
|
|
|
|
|
|
inner_dir_name=zplugins-$zplugins_ver
|
|
|
|
full_private_dir="`pwd`/$private_dir"
|
|
|
|
|
|
|
|
echo `pwd`
|
|
|
|
|
|
|
|
rm -rf $private_dir
|
|
|
|
rm -rf $out_file
|
|
|
|
mkdir -p $private_dir
|
|
|
|
mkdir -p $out_file
|
|
|
|
tar xf $tarball -C $private_dir
|
|
|
|
mv $private_dir/zplugins $private_dir/$inner_dir_name
|
|
|
|
pushd $private_dir/$inner_dir_name
|
|
|
|
meson_opts="--prefix=/"
|
|
|
|
if [[ "$distro" == "osx-brew"* ]]; then
|
|
|
|
# set lv2 core spec path
|
|
|
|
lv2_cellar=`brew info lv2 | sed '4q;d' | awk '{print $1;}'`
|
|
|
|
meson_opts="$meson_opts -Dlv2_core_path=$lv2_cellar/lib"
|
|
|
|
elif [[ "$distro" == "fedora"* ]]; then
|
|
|
|
meson_opts="$meson_opts -Dlv2_core_path=/usr/lib64/lv2"
|
|
|
|
else
|
|
|
|
meson_opts="$meson_opts -Dlv2_core_path=/usr/lib/lv2"
|
|
|
|
fi
|
|
|
|
$meson_bin build --buildtype=debugoptimized \
|
|
|
|
$meson_opts
|
|
|
|
popd
|
|
|
|
|
|
|
|
# fedora's lv2_validate is broken
|
|
|
|
if [[ "$distro" != "fedora"* ]]; then
|
|
|
|
ninja -C $private_dir/$inner_dir_name/build test
|
|
|
|
fi
|
|
|
|
|
|
|
|
DESTDIR="`pwd`/$out_file" ninja -C $private_dir/$inner_dir_name/build install
|