84 lines
3.3 KiB
Bash
84 lines
3.3 KiB
Bash
# This is the recipe.sh script. It is executed by BPM in a temporary directory when compiling a source package
|
|
# BPM Expects the source code to be extracted into the automatically created 'source' directory which can be accessed using $BPM_SOURCE
|
|
# BPM Expects the output files to be present in the automatically created 'output' directory which can be accessed using $BPM_OUTPUT
|
|
|
|
prepare() {
|
|
cd "$BPM_SOURCE"
|
|
patch -Np1 -i "$BPM_WORKDIR"/svt-av1-fix.patch
|
|
}
|
|
|
|
# The build function is executed in the source directory
|
|
# This function is used to compile the source code
|
|
build() {
|
|
./configure --prefix=/usr \
|
|
--incdir=/usr/include/ffmpeg4.4 \
|
|
--libdir=/usr/lib/ffmpeg4.4 \
|
|
--enable-gpl \
|
|
--enable-version3 \
|
|
--disable-static \
|
|
--enable-shared \
|
|
--disable-debug \
|
|
--disable-stripping \
|
|
--disable-doc \
|
|
--disable-programs \
|
|
--enable-amf \
|
|
--enable-gmp \
|
|
--enable-gnutls \
|
|
--enable-libaom \
|
|
--enable-libass \
|
|
--enable-libbluray \
|
|
--enable-libdrm \
|
|
--enable-libfreetype \
|
|
--enable-libgsm \
|
|
--enable-libmp3lame \
|
|
--enable-libopencore_amrnb \
|
|
--enable-libopencore_amrwb \
|
|
--enable-libopenjpeg \
|
|
--enable-libopus \
|
|
--enable-libopus \
|
|
--enable-libpulse \
|
|
--enable-librav1e \
|
|
--enable-librsvg \
|
|
--enable-libspeex \
|
|
--enable-libssh \
|
|
--enable-libsvtav1 \
|
|
--enable-libv4l2 \
|
|
--enable-libvorbis \
|
|
--enable-libvpx \
|
|
--enable-libwebp \
|
|
--enable-libx264 \
|
|
--enable-libx265 \
|
|
--enable-libxcb \
|
|
--enable-libxml2 \
|
|
--enable-vaapi \
|
|
--enable-vulkan \
|
|
--ignore-tests=enhanced-flv-av1 \
|
|
--docdir=/usr/share/doc/ffmpeg
|
|
|
|
make
|
|
make tools/qt-faststart
|
|
make doc/ff{mpeg,play}.1
|
|
}
|
|
|
|
# The package function is executed in the source directory
|
|
# This function is used to move the compiled files into the output directory
|
|
package() {
|
|
make DESTDIR="$BPM_OUTPUT" install
|
|
|
|
# Move libs to /usr/lib, except the .so symlinks
|
|
pushd "$BPM_OUTPUT" &> /dev/null
|
|
local f
|
|
for f in usr/lib/ffmpeg4.4/*; do
|
|
if [[ $f == *.so ]]; then
|
|
ln -srf -- usr/lib/"$(readlink "$f")" "$f"
|
|
elif [[ ! -d $f ]]; then
|
|
mv "$f" usr/lib
|
|
fi
|
|
done
|
|
rm -r usr/share
|
|
popd &> /dev/null
|
|
|
|
# Install package license
|
|
install -Dm644 "$BPM_SOURCE"/COPYING.GPLv3 "$BPM_OUTPUT"/usr/share/licenses/ffmpeg4.4/COPYING.GPLv3
|
|
}
|