diff options
author | Joshua M. Boniface <joshua@boniface.me> | 2024-05-07 10:47:11 -0400 |
---|---|---|
committer | Joshua M. Boniface <joshua@boniface.me> | 2024-05-08 17:23:31 -0400 |
commit | d125f7fdb1eee8a6fd0ebbc86e3c150cb1fb7692 (patch) | |
tree | 89a35ca434b127c71e9ad84867ebb0c9a0608e27 | |
parent | Clarify debsig-verify status (diff) | |
download | jellyfin-packaging-d125f7fdb1eee8a6fd0ebbc86e3c150cb1fb7692.tar.gz jellyfin-packaging-d125f7fdb1eee8a6fd0ebbc86e3c150cb1fb7692.tar.bz2 jellyfin-packaging-d125f7fdb1eee8a6fd0ebbc86e3c150cb1fb7692.zip |
Add portable build FFmpeg downloads
-rw-r--r-- | portable/Dockerfile | 1 | ||||
-rwxr-xr-x | portable/build.sh | 45 |
2 files changed, 46 insertions, 0 deletions
diff --git a/portable/Dockerfile b/portable/Dockerfile index a2fd069..f3d1b5b 100644 --- a/portable/Dockerfile +++ b/portable/Dockerfile @@ -26,6 +26,7 @@ RUN apt-get update -y \ && DEBIAN_FRONTEND=noninteractive TZ=Etc/UTC \ apt-get install --no-install-recommends -y \ wget \ + unzip \ debhelper \ gnupg \ devscripts \ diff --git a/portable/build.sh b/portable/build.sh index 8693ee0..fc663b6 100755 --- a/portable/build.sh +++ b/portable/build.sh @@ -5,6 +5,10 @@ set -o errexit set -o xtrace +# Set global variables +REPOSITORY_URI="https://repo.jellyfin.org" +FFMPEG_VERSION="6.x" + # Create the intermediate build dir BUILD_DIR="/build" mkdir -p ${BUILD_DIR}/jellyfin @@ -43,6 +47,47 @@ else fi pushd ${BUILD_DIR} + +pushd jellyfin +# Fetch any additional package(s) needed here (i.e. FFmpeg) +# This is a hack because the ffmpeg naming is very inconsistent and we need to find the right URL(s) from the repo browser +case ${BUILD_TYPE}-${PACKAGE_ARCH} in + linux-amd64*) + FFMPEG_PATH=$( curl ${REPOSITORY_URI}/?path=/ffmpeg/linux/latest-${FFMPEG_VERSION}/amd64 | grep -o "/files/.*_portable_linux64-gpl.tar.xz'" | sed "s/'$//" ) + curl --location --output ffmpeg.tar.xz ${REPOSITORY_URI}${FFMPEG_PATH} + tar -xvJf ffmpeg.tar.xz + rm ffmpeg.tar.xz + ;; + linux-arm64*) + FFMPEG_PATH=$( curl ${REPOSITORY_URI}/?path=/ffmpeg/linux/latest-${FFMPEG_VERSION}/arm64 | grep -o "/files/.*_portable_linuxarm64-gpl.tar.xz'" | sed "s/'$//" ) + curl --location --output ffmpeg.tar.xz ${REPOSITORY_URI}${FFMPEG_PATH} + tar -xvJf ffmpeg.tar.xz + rm ffmpeg.tar.xz + ;; + macos-amd64) + FFMPEG_PATH=$( curl ${REPOSITORY_URI}/?path=/ffmpeg/macos/latest-${FFMPEG_VERSION}/x86_64 | grep -o "/files/.*_portable_mac64-gpl.tar.xz'" | sed "s/'$//" ) + curl --location --output ffmpeg.tar.xz ${REPOSITORY_URI}${FFMPEG_PATH} + tar -xvJf ffmpeg.tar.xz + rm ffmpeg.tar.xz + ;; + macos-arm64) + FFMPEG_PATH=$( curl ${REPOSITORY_URI}/?path=/ffmpeg/macos/latest-${FFMPEG_VERSION}/arm64 | grep -o "/files/.*_portable_macarm64-gpl.tar.xz'" | sed "s/'$//" ) + curl --location --output ffmpeg.tar.xz ${REPOSITORY_URI}${FFMPEG_PATH} + tar -xvJf ffmpeg.tar.xz + rm ffmpeg.tar.xz + ;; + windows-amd64) + FFMPEG_PATH=$( curl ${REPOSITORY_URI}/?path=/ffmpeg/windows/latest-${FFMPEG_VERSION}/win64 | grep -o "/files/.*-portable_win64.zip'" | sed "s/'$//" ) + curl --location --output ffmpeg.zip ${REPOSITORY_URI}${FFMPEG_PATH} + unzip ffmpeg.zip + rm ffmpeg.zip + ;; + *) + true + ;; +esac +popd + for ARCHIVE_TYPE in $( tr ',' '\n' <<<"${ARCHIVE_TYPES}" ); do case ${ARCHIVE_TYPE} in targz) |