FFmpeg-Builds/scripts.d/50-opencore-amr.sh

50 lines
1,005 B
Bash
Raw Normal View History

2020-09-19 22:46:24 +00:00
#!/bin/bash
OAMR_SRC="https://sourceforge.net/projects/opencore-amr/files/opencore-amr/opencore-amr-0.1.5.tar.gz/download"
ffbuild_enabled() {
return 0
}
ffbuild_dockerbuild() {
mkdir opencore
cd opencore
wget -O opencore.tar.gz "$OAMR_SRC"
tar xaf opencore.tar.gz
rm opencore.tar.gz
cd opencore*
autoreconf -i
local myconf=(
--prefix="$FFBUILD_PREFIX"
--disable-shared
--enable-static
--with-pic
--enable-amrnb-encoder
--enable-amrnb-decoder
--disable-examples
)
if [[ $TARGET == win* || $TARGET == linux* ]]; then
2020-09-19 22:46:24 +00:00
myconf+=(
--host="$FFBUILD_TOOLCHAIN"
)
else
2020-09-19 22:46:24 +00:00
echo "Unknown target"
return -1
fi
./configure "${myconf[@]}"
make -j$(nproc)
make install
}
ffbuild_configure() {
echo --enable-libopencore-amrnb --enable-libopencore-amrwb
}
ffbuild_unconfigure() {
echo --disable-libopencore-amrnb --disable-libopencore-amrwb
}