2022-06-07 23:18:43 +00:00
|
|
|
#!/bin/bash
|
|
|
|
set -e
|
|
|
|
|
|
|
|
SCRIPTPATH=$(realpath "$(dirname "${BASH_SOURCE[0]}")")
|
|
|
|
INSTALL_PREFIX="$1"
|
|
|
|
EXTRA_CMAKE_OPTS="$2"
|
|
|
|
|
|
|
|
cd "$SCRIPTPATH/.."
|
|
|
|
|
|
|
|
if [[ ! -d rz_libyara ]]; then
|
|
|
|
git clone https://github.com/rizinorg/rz-libyara.git --depth 1 rz_libyara
|
|
|
|
git -C rz_libyara submodule init
|
|
|
|
git -C rz_libyara submodule update
|
|
|
|
fi
|
|
|
|
|
|
|
|
cd rz_libyara
|
|
|
|
|
2023-06-20 08:40:57 +00:00
|
|
|
meson --buildtype=release --pkg-config-path="$INSTALL_PREFIX/lib/pkgconfig" --prefix="$INSTALL_PREFIX" -Duse_sys_yara=disabled build
|
2022-06-07 23:18:43 +00:00
|
|
|
ninja -C build install
|
|
|
|
|
|
|
|
cd cutter-plugin
|
|
|
|
mkdir build && cd build
|
|
|
|
cmake -G Ninja -DRIZIN_INSTALL_PLUGDIR="../build" -DCMAKE_INSTALL_PREFIX="$INSTALL_PREFIX" $EXTRA_CMAKE_OPTS ..
|
|
|
|
ninja
|
|
|
|
ninja install
|