123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130 |
- #!/bin/bash
- if [[ $# -lt 2 ]]; then
- echo "Invalid Arguments"
- exit -1
- fi
- TARGET="$1"
- VARIANT="$2"
- shift 2
- if ! [[ -f "variants/${TARGET}-${VARIANT}.sh" ]]; then
- echo "Invalid target/variant"
- exit -1
- fi
- LICENSE_FILE="COPYING.LGPLv2.1"
- ADDINS=()
- ADDINS_STR=""
- while [[ "$#" -gt 0 ]]; do
- if ! [[ -f "addins/${1}.sh" ]]; then
- echo "Invalid addin: $1"
- exit -1
- fi
- ADDINS+=( "$1" )
- ADDINS_STR="${ADDINS_STR}${ADDINS_STR:+-}$1"
- shift
- done
- REPO="${GITHUB_REPOSITORY:-yt-dlp/ffmpeg-builds}"
- REPO="${REPO,,}"
- REGISTRY="${REGISTRY_OVERRIDE:-ghcr.io}"
- BASE_IMAGE="${REGISTRY}/${REPO}/base:latest"
- TARGET_IMAGE="${REGISTRY}/${REPO}/base-${TARGET}:latest"
- IMAGE="${REGISTRY}/${REPO}/${TARGET}-${VARIANT}${ADDINS_STR:+-}${ADDINS_STR}:latest"
- ffbuild_ffver() {
- case "$ADDINS_STR" in
- *4.4*)
- echo 404
- ;;
- *5.0*)
- echo 500
- ;;
- *5.1*)
- echo 501
- ;;
- *6.0*)
- echo 600
- ;;
- *6.1*)
- echo 601
- ;;
- *7.0*)
- echo 700
- ;;
- *)
- echo 99999999
- ;;
- esac
- }
- ffbuild_dockerstage() {
- if [[ -n "$SELFCACHE" ]]; then
- to_df "RUN --mount=src=${SELF},dst=/stage.sh --mount=src=${SELFCACHE},dst=/cache.tar.xz run_stage /stage.sh"
- else
- to_df "RUN --mount=src=${SELF},dst=/stage.sh run_stage /stage.sh"
- fi
- }
- ffbuild_dockerlayer() {
- to_df "COPY --link --from=${SELFLAYER} \$FFBUILD_PREFIX/. \$FFBUILD_PREFIX"
- }
- ffbuild_dockerfinal() {
- to_df "COPY --link --from=${PREVLAYER} \$FFBUILD_PREFIX/. \$FFBUILD_PREFIX"
- }
- ffbuild_configure() {
- return 0
- }
- ffbuild_unconfigure() {
- return 0
- }
- ffbuild_cflags() {
- return 0
- }
- ffbuild_uncflags() {
- return 0
- }
- ffbuild_cxxflags() {
- return 0
- }
- ffbuild_uncxxflags() {
- return 0
- }
- ffbuild_ldexeflags() {
- return 0
- }
- ffbuild_unldexeflags() {
- return 0
- }
- ffbuild_ldflags() {
- return 0
- }
- ffbuild_unldflags() {
- return 0
- }
- ffbuild_libs() {
- return 0
- }
- ffbuild_unlibs() {
- return 0
- }
|