-
-
Notifications
You must be signed in to change notification settings - Fork 131
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #76 from nyanmisaka/ff4.4-jf
- Loading branch information
Showing
185 changed files
with
15,154 additions
and
3,301 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,45 @@ | ||
FROM DISTRO | ||
|
||
# Docker build arguments | ||
ARG SOURCE_DIR=/ffmpeg | ||
ARG ARTIFACT_DIR=/dist | ||
|
||
# Docker run environment | ||
ENV DEBIAN_FRONTEND=noninteractive \ | ||
SOURCE_DIR=/ffmpeg \ | ||
ARTIFACT_DIR=/dist \ | ||
FF_REV=FFMPEG_REV \ | ||
FF_PREFIX=/opt/ffmpeg \ | ||
FF_DEPS_PREFIX=/opt/ffdeps \ | ||
FF_TOOLCHAIN=x86_64-w64-mingw32 \ | ||
FF_CROSS_PREFIX=x86_64-w64-mingw32- \ | ||
FF_CMAKE_TOOLCHAIN=${SOURCE_DIR}/toolchain-win64.cmake \ | ||
FF_MESON_TOOLCHAIN=${SOURCE_DIR}/cross-win64.meson \ | ||
FF_TARGET_FLAGS="--arch=x86_64 --target-os=mingw32 --cross-prefix=x86_64-w64-mingw32- --pkg-config=pkg-config --pkg-config-flags=--static" \ | ||
PKG_CONFIG=pkg-config \ | ||
PKG_CONFIG_LIBDIR=/opt/ffdeps/lib/pkgconfig:/opt/ffdeps/share/pkgconfig \ | ||
CFLAGS="-static-libgcc -static-libstdc++ -I/opt/ffdeps/include -mtune=generic -O2 -pipe -D_FORTIFY_SOURCE=0" \ | ||
CXXFLAGS="-static-libgcc -static-libstdc++ -I/opt/ffdeps/include -mtune=generic -O2 -pipe -D_FORTIFY_SOURCE=0" \ | ||
LDFLAGS="-static-libgcc -static-libstdc++ -L/opt/ffdeps/lib -O2 -pipe" \ | ||
DLLTOOL="x86_64-w64-mingw32-dlltool" | ||
|
||
# Prepare Debian and mingw-w64 build environment | ||
RUN \ | ||
apt-get -y update && \ | ||
apt-get -y install build-essential yasm nasm xxd pkgconf git curl wget unzip subversion autoconf automake libtool libtool-bin autopoint cmake clang texinfo texi2html help2man flex bison gperf gettext itstool ragel libc6-dev libssl-dev gtk-doc-tools gobject-introspection gawk meson ninja-build p7zip-full python3-distutils python3-apt python-is-python3 zip quilt binutils-mingw-w64-x86-64 gcc-mingw-w64-x86-64 g++-mingw-w64-x86-64 gfortran-mingw-w64-x86-64 && \ | ||
rm /usr/lib/gcc/*-w64-mingw32/*/libstdc++*.dll* && \ | ||
rm /usr/lib/gcc/*-w64-mingw32/*/libgcc_s* && \ | ||
rm /usr/lib/gcc/*-w64-mingw32/*/*.dll.a && \ | ||
rm /usr/*-w64-mingw32/lib/*.dll.a | ||
|
||
# Prepare build script and patches | ||
RUN \ | ||
mkdir -p /opt/ffmpeg /opt/ffdeps ${SOURCE_DIR} && \ | ||
ln -sf ${SOURCE_DIR}/debian/patches ${SOURCE_DIR} && \ | ||
ln -sf ${SOURCE_DIR}/docker-build-win64.sh /docker-build-win64.sh | ||
|
||
VOLUME ${ARTIFACT_DIR}/ | ||
|
||
COPY . ${SOURCE_DIR}/ | ||
|
||
ENTRYPOINT ["/docker-build-win64.sh"] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
#!/usr/bin/make | ||
DISTRO=ubuntu:hirsute | ||
FF_REV=1 | ||
.PHONY: Dockerfile | ||
Dockerfile: Dockerfile.win64.in | ||
sed 's/DISTRO/$(DISTRO)/; s/FFMPEG_REV/$(FF_REV)/' $< > $@ || rm -f $@ | ||
clean: | ||
rm -f Dockerfile |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
4.4 | ||
4.4.1 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
4.4 | ||
4.4.1 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,40 @@ | ||
#!/usr/bin/env bash | ||
|
||
set -o xtrace | ||
set -o errexit | ||
|
||
# Check for dependencies | ||
for dep in docker make; do | ||
command -v ${dep} &>/dev/null || { echo "The command '${dep}' is required."; exit 1; } | ||
done | ||
|
||
# Use the latest distro for toolchains | ||
distro="ubuntu:impish" | ||
ffrevison="1" | ||
image_name="jellyfin-ffmpeg-build-windows-win64" | ||
package_temporary_dir="$( mktemp -d )" | ||
current_user="$( whoami )" | ||
|
||
# Trap cleanup for latter sections | ||
cleanup() { | ||
# Clean up the Dockerfile | ||
make -f Dockerfile.win64.make clean | ||
# Remove tempdir | ||
rm -rf "${package_temporary_dir}" | ||
} | ||
trap cleanup EXIT INT | ||
|
||
# Generate Dockerfile | ||
make -f Dockerfile.win64.make DISTRO=${distro} FF_REV=${ffrevison} | ||
# Set up the build environment docker image | ||
docker build . -t "${image_name}" | ||
# Build the APKs and copy out to ${package_temporary_dir} | ||
docker run --rm -v "${package_temporary_dir}:/dist" "${image_name}" | ||
# If no 1st parameter was specified, move APKs to parent directory | ||
if [[ -z ${1} ]]; then | ||
path="../bin" | ||
else | ||
path="${1}" | ||
fi | ||
mkdir ${path} &>/dev/null || true | ||
mv "${package_temporary_dir}"/zip/jellyfin-ffmpeg*.{zip,sha256sum} "${path}" |
Oops, something went wrong.