FFmpeg-Builds/scripts.d/50-libmp3lame.sh

53 lines
929 B
Bash
Executable File

#!/bin/bash
LAME_SRC="https://sourceforge.net/projects/lame/files/lame/3.100/lame-3.100.tar.gz/download"
ffbuild_enabled() {
return 0
}
ffbuild_dockerstage() {
to_df "ADD $SELF /stage.sh"
to_df "RUN run_stage"
}
ffbuild_dockerbuild() {
mkdir lame
cd lame
wget -O lame.tar.gz "$LAME_SRC"
tar xaf lame.tar.gz
rm lame.tar.gz
cd lame*
local myconf=(
--prefix="$FFBUILD_PREFIX"
--disable-shared
--enable-static
--enable-nasm
--disable-gtktest
--disable-cpml
--disable-frontend
)
if [[ $TARGET == win* ]]; then
myconf+=(
--host="$FFBUILD_TOOLCHAIN"
)
else
echo "Unknown target"
return -1
fi
./configure "${myconf[@]}"
make -j$(nproc)
make install
}
ffbuild_configure() {
echo --enable-libmp3lame
}
ffbuild_unconfigure() {
echo --disable-libmp3lame
}