forked from BtbN/FFmpeg-Builds
-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add experimental alpine linux64 base image
- Loading branch information
Showing
18 changed files
with
134 additions
and
10 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
FROM alpine:edge | ||
|
||
ENV CARGO_HOME="/opt/cargo" PATH="/opt/cargo/bin:${PATH}" | ||
RUN \ | ||
apk add --no-cache \ | ||
yasm nasm diffutils xxd pkgconf git ca-certificates curl wget unzip subversion autoconf automake libtool perl make cmake clang texinfo gperf gettext gettext-dev gettext-static itstool ragel musl-dev openssl-dev zlib-dev bzip2-static gtk-doc gobject-introspection gawk meson samurai p7zip python3 \ | ||
binutils gcc g++ gfortran \ | ||
rust cargo && \ | ||
ln -s python3 /usr/bin/python && \ | ||
cargo install cargo-c && rm -rf "${CARGO_HOME}"/{registry,git} && \ | ||
git config --global user.email "builder@localhost" && \ | ||
git config --global user.name "Builder" && \ | ||
mkdir /opt/ffbuild | ||
|
||
ADD run_stage.sh /usr/bin/run_stage | ||
ADD git-mini-clone.sh /usr/bin/git-mini-clone | ||
ADD check-wget.sh /usr/bin/check-wget | ||
|
||
ADD toolchain.cmake /toolchain.cmake | ||
ADD cross.meson /cross.meson | ||
|
||
ENV FFBUILD_TARGET_FLAGS="" \ | ||
FFBUILD_TOOLCHAIN=x86_64-alpine-linux-musl \ | ||
FFBUILD_CROSS_PREFIX="" \ | ||
FFBUILD_RUST_TARGET="" \ | ||
FFBUILD_PREFIX=/opt/ffbuild \ | ||
FFBUILD_CMAKE_TOOLCHAIN=/toolchain.cmake \ | ||
PKG_CONFIG_LIBDIR=/opt/ffbuild/lib/pkgconfig \ | ||
CFLAGS="-static-libgcc -static-libstdc++ -I/opt/ffbuild/include -O2 -pipe -D_FORTIFY_SOURCE=2 -fstack-protector-strong" \ | ||
CXXFLAGS="-static-libgcc -static-libstdc++ -I/opt/ffbuild/include -O2 -pipe -D_FORTIFY_SOURCE=2 -fstack-protector-strong" \ | ||
LDFLAGS="-static-libgcc -static-libstdc++ -L/opt/ffbuild/lib -O2 -pipe -fstack-protector-strong" |
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,10 @@ | ||
#!/bin/bash | ||
set -xe | ||
FNAME="$1" | ||
URL="$2" | ||
SHA512="$3" | ||
SHAFILE="${FNAME}.sha512" | ||
wget -O "${FNAME}" "${URL}" | ||
trap "rm -f ${SHAFILE}" EXIT | ||
echo "${SHA512} ${FNAME}" > "${SHAFILE}" | ||
sha512sum -c "${SHAFILE}" |
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,15 @@ | ||
[binaries] | ||
c = 'x86_64-alpine-linux-musl-gcc' | ||
cpp = x86_64-alpine-linux-musl-g++' | ||
ar = 'ar' | ||
strip = 'strip' | ||
|
||
[properties] | ||
c_link_args = ['-static-libgcc', '-L/opt/ffbuild/lib', '-O2', '-pipe', '-fstack-protector-strong'] | ||
cpp_link_args = ['-static-libgcc', '-static-libstdc++', '-L/opt/ffbuild/lib', '-O2', '-pipe', '-fstack-protector-strong'] | ||
|
||
[host_machine] | ||
system = 'linux' | ||
cpu_family = 'x86_64' | ||
cpu = 'x86_64' | ||
endian = 'little' |
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,10 @@ | ||
#!/bin/bash | ||
set -xe | ||
REPO="$1" | ||
REF="$2" | ||
DEST="$3" | ||
git init "$DEST" | ||
git -C "$DEST" remote add origin "$REPO" | ||
git -C "$DEST" fetch --depth=1 origin "$REF" | ||
git -C "$DEST" config advice.detachedHead false | ||
git -C "$DEST" checkout FETCH_HEAD |
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,7 @@ | ||
#!/bin/bash | ||
set -xe | ||
mkdir -p /stage | ||
source "$1" | ||
cd /stage | ||
ffbuild_dockerbuild | ||
rm -rf /stage "$FFBUILD_PREFIX"/bin |
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,12 @@ | ||
set(CMAKE_SYSTEM_NAME Linux) | ||
set(CMAKE_SYSTEM_PROCESSOR x86_64) | ||
|
||
set(CMAKE_C_COMPILER x86_64-alpine-linux-musl-gcc) | ||
set(CMAKE_CXX_COMPILER x86_64-alpine-linux-musl-g++) | ||
set(CMAKE_RANLIB ranlib) | ||
|
||
set(CMAKE_FIND_ROOT_PATH /usr/x86_64-alpine-linux-musl /opt/ffbuild) | ||
|
||
set(CMAKE_FIND_ROOT_PATH_MODE_PROGRAM NEVER) | ||
set(CMAKE_FIND_ROOT_PATH_MODE_LIBRARY ONLY) | ||
set(CMAKE_FIND_ROOT_PATH_MODE_INCLUDE ONLY) |
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,18 @@ | ||
#!/bin/bash | ||
|
||
package_variant() { | ||
IN="$1" | ||
OUT="$2" | ||
|
||
# mkdir -p "$OUT"/bin | ||
# cp "$IN"/bin/* "$OUT"/bin | ||
|
||
mkdir -p "$OUT"/lib | ||
cp -a "$IN"/lib/*.so* "$OUT"/lib | ||
|
||
mkdir -p "$OUT"/include | ||
cp -r "$IN"/include/* "$OUT"/include | ||
|
||
mkdir -p "$OUT"/doc | ||
cp -r "$IN"/share/doc/ffmpeg/* "$OUT"/doc | ||
} |
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,3 @@ | ||
#!/bin/bash | ||
source "$(dirname "$BASH_SOURCE")"/linux-install-shared.sh | ||
source "$(dirname "$BASH_SOURCE")"/defaults-gpl-shared.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,3 @@ | ||
#!/bin/bash | ||
source "$(dirname "$BASH_SOURCE")"/default-install.sh | ||
source "$(dirname "$BASH_SOURCE")"/defaults-gpl.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,3 @@ | ||
#!/bin/bash | ||
source "$(dirname "$BASH_SOURCE")"/linux-install-shared.sh | ||
source "$(dirname "$BASH_SOURCE")"/defaults-lgpl-shared.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,3 @@ | ||
#!/bin/bash | ||
source "$(dirname "$BASH_SOURCE")"/default-install.sh | ||
source "$(dirname "$BASH_SOURCE")"/defaults-lgpl.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 |
---|---|---|
@@ -1,3 +1,3 @@ | ||
#!/bin/bash | ||
source "$(dirname "$BASH_SOURCE")"/default-install-shared.sh | ||
source "$(dirname "$BASH_SOURCE")"/windows-install-shared.sh | ||
source "$(dirname "$BASH_SOURCE")"/defaults-gpl-shared.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 |
---|---|---|
@@ -1,3 +1,3 @@ | ||
#!/bin/bash | ||
source "$(dirname "$BASH_SOURCE")"/default-install-shared.sh | ||
source "$(dirname "$BASH_SOURCE")"/windows-install-shared.sh | ||
source "$(dirname "$BASH_SOURCE")"/defaults-lgpl-shared.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 |
---|---|---|
@@ -1,3 +1,3 @@ | ||
#!/bin/bash | ||
source "$(dirname "$BASH_SOURCE")"/default-install-shared.sh | ||
source "$(dirname "$BASH_SOURCE")"/windows-install-shared.sh | ||
source "$(dirname "$BASH_SOURCE")"/defaults-gpl-shared.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 |
---|---|---|
@@ -1,3 +1,3 @@ | ||
#!/bin/bash | ||
source "$(dirname "$BASH_SOURCE")"/default-install-shared.sh | ||
source "$(dirname "$BASH_SOURCE")"/windows-install-shared.sh | ||
source "$(dirname "$BASH_SOURCE")"/defaults-lgpl-shared.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