adofai-ffmpeg-builder/build.sh

33 lines
617 B
Bash
Raw Normal View History

export ARCH=$(uname -m)
2023-05-03 18:06:33 +09:00
# do not use all cpus because my computer dies
export JOBS=$(awk -v count=$(nproc) 'BEGIN { print ( int( count - 1 ) ) }')
while [[ $# -gt 0 ]]; do
case $1 in
--arch)
export ARCH=$2
shift 2
;;
*)
echo "Usage: $0 --arch [arch]"
exit 1
;;
esac
done
2023-05-02 19:35:56 +09:00
export workDir=$(pwd)/work
export outDir=$(pwd)/out
export PREFIX=$workDir/prefix
export PKG_CONFIG_DIR=$PREFIX/lib/pkgconfig
export PKG_CONFIG_PATH=$PKG_CONFIG_DIR
rm -rf $PREFIX
mkdir -p $PREFIX
2023-05-02 19:35:56 +09:00
mkdir -p $workDir
mkdir -p $outDir
bash scripts/build-openh264.sh
bash scripts/build-ffmpeg.sh