#!/bin/bash export PKG_CONFIG_PATH=/app/ffmpeg/install/lib/pkgconfig:/app/ffmpeg/install/lib64/pkgconfig/ curDir="$PWD" pkg=mesa-drm if ! [[ -d "$pkg" ]] then git clone https://github.com/freedesktop/mesa-drm.git fi mkdir -p build cd "$pkg" meson ../build/ meson configure ../build/ -Dprefix=/app/ffmpeg/install/ cd ../ if ninja -C build/ install then make install cd "$curDir" rm -rf "$pkg" "build" else cd "$curDir" echo "BUILD FAILED" fi echo "Done"