#!@BASH@ # # Copyright (C) 2020-2021 Alexandros Theodotou # # This file is part of Zrythm # # Zrythm is free software: you can redistribute it and/or modify # it under the terms of the GNU Affero General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at your option) any later version. # # Zrythm is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU Affero General Public License for more details. # # You should have received a copy of the GNU Affero General Public License # along with Zrythm. If not, see . 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"* && "$distro" != "osx"* ]]; then ninja -C $private_dir/$inner_dir_name/build test fi DESTDIR="`pwd`/$out_file" ninja -C $private_dir/$inner_dir_name/build install