commit
655a3ac54b
@ -1,59 +0,0 @@
|
|||||||
VERSION := $(shell sed -ne '/^Version:/s/.* *//p' \
|
|
||||||
deployment/fedora-package-x64/pkg-src/jellyfin.spec)
|
|
||||||
|
|
||||||
deployment/fedora-package-x64/pkg-src/jellyfin-web-$(VERSION).tar.gz:
|
|
||||||
curl -f -L -o deployment/fedora-package-x64/pkg-src/jellyfin-web-$(VERSION).tar.gz \
|
|
||||||
https://github.com/jellyfin/jellyfin-web/archive/v$(VERSION).tar.gz \
|
|
||||||
|| curl -f -L -o deployment/fedora-package-x64/pkg-src/jellyfin-web-$(VERSION).tar.gz \
|
|
||||||
https://github.com/jellyfin/jellyfin-web/archive/master.tar.gz \
|
|
||||||
|
|
||||||
srpm: deployment/fedora-package-x64/pkg-src/jellyfin-web-$(VERSION).tar.gz
|
|
||||||
cd deployment/fedora-package-x64; \
|
|
||||||
SOURCE_DIR=../.. \
|
|
||||||
WORKDIR="$${PWD}"; \
|
|
||||||
package_temporary_dir="$${WORKDIR}/pkg-dist-tmp"; \
|
|
||||||
pkg_src_dir="$${WORKDIR}/pkg-src"; \
|
|
||||||
GNU_TAR=1; \
|
|
||||||
tar \
|
|
||||||
--transform "s,^\.,jellyfin-$(VERSION)," \
|
|
||||||
--exclude='.git*' \
|
|
||||||
--exclude='**/.git' \
|
|
||||||
--exclude='**/.hg' \
|
|
||||||
--exclude='**/.vs' \
|
|
||||||
--exclude='**/.vscode' \
|
|
||||||
--exclude='deployment' \
|
|
||||||
--exclude='**/bin' \
|
|
||||||
--exclude='**/obj' \
|
|
||||||
--exclude='**/.nuget' \
|
|
||||||
--exclude='*.deb' \
|
|
||||||
--exclude='*.rpm' \
|
|
||||||
-czf "pkg-src/jellyfin-$(VERSION).tar.gz" \
|
|
||||||
-C $${SOURCE_DIR} ./ || GNU_TAR=0; \
|
|
||||||
if [ $${GNU_TAR} -eq 0 ]; then \
|
|
||||||
package_temporary_dir="$$(mktemp -d)"; \
|
|
||||||
mkdir -p "$${package_temporary_dir}/jellyfin"; \
|
|
||||||
tar \
|
|
||||||
--exclude='.git*' \
|
|
||||||
--exclude='**/.git' \
|
|
||||||
--exclude='**/.hg' \
|
|
||||||
--exclude='**/.vs' \
|
|
||||||
--exclude='**/.vscode' \
|
|
||||||
--exclude='deployment' \
|
|
||||||
--exclude='**/bin' \
|
|
||||||
--exclude='**/obj' \
|
|
||||||
--exclude='**/.nuget' \
|
|
||||||
--exclude='*.deb' \
|
|
||||||
--exclude='*.rpm' \
|
|
||||||
-czf "$${package_temporary_dir}/jellyfin/jellyfin-$(VERSION).tar.gz" \
|
|
||||||
-C $${SOURCE_DIR} ./; \
|
|
||||||
mkdir -p "$${package_temporary_dir}/jellyfin-$(VERSION)"; \
|
|
||||||
tar -xzf "$${package_temporary_dir}/jellyfin/jellyfin-$(VERSION).tar.gz" \
|
|
||||||
-C "$${package_temporary_dir}/jellyfin-$(VERSION); \
|
|
||||||
rm -f "$${package_temporary_dir}/jellyfin/jellyfin-$(VERSION).tar.gz"; \
|
|
||||||
tar -czf "$${SOURCE_DIR}/SOURCES/pkg-src/jellyfin-$(VERSION).tar.gz" \
|
|
||||||
-C "$${package_temporary_dir}" "jellyfin-$(VERSION); \
|
|
||||||
rm -rf $${package_temporary_dir}; \
|
|
||||||
fi; \
|
|
||||||
rpmbuild -bs pkg-src/jellyfin.spec \
|
|
||||||
--define "_sourcedir $$PWD/pkg-src/" \
|
|
||||||
--define "_srcrpmdir $(outdir)"
|
|
@ -0,0 +1 @@
|
|||||||
|
../fedora/Makefile
|
@ -0,0 +1,3 @@
|
|||||||
|
# Joshua must review all changes to deployment and build.sh
|
||||||
|
deployment/* @joshuaboniface
|
||||||
|
build.sh @joshuaboniface
|
@ -1,4 +1,4 @@
|
|||||||
using System.Reflection;
|
using System.Reflection;
|
||||||
|
|
||||||
[assembly: AssemblyVersion("10.5.0")]
|
[assembly: AssemblyVersion("10.6.0")]
|
||||||
[assembly: AssemblyFileVersion("10.5.0")]
|
[assembly: AssemblyFileVersion("10.6.0")]
|
||||||
|
@ -1,197 +0,0 @@
|
|||||||
#!/usr/bin/env bash
|
|
||||||
|
|
||||||
# build - build Jellyfin binaries or packages
|
|
||||||
|
|
||||||
set -o errexit
|
|
||||||
set -o pipefail
|
|
||||||
|
|
||||||
# The list of possible package actions (except 'clean')
|
|
||||||
declare -a actions=( 'build' 'package' 'sign' 'publish' )
|
|
||||||
|
|
||||||
# The list of possible platforms, based on directories under 'deployment/'
|
|
||||||
declare -a platforms=( $(
|
|
||||||
find deployment/ -maxdepth 1 -mindepth 1 -type d -exec basename {} \; | sort
|
|
||||||
) )
|
|
||||||
|
|
||||||
# The list of standard dependencies required by all build scripts; individual
|
|
||||||
# action scripts may specify their own dependencies
|
|
||||||
declare -a dependencies=( 'tar' 'zip' )
|
|
||||||
|
|
||||||
usage() {
|
|
||||||
echo -e "build - build Jellyfin binaries or packages"
|
|
||||||
echo -e ""
|
|
||||||
echo -e "Usage:"
|
|
||||||
echo -e " $ build --list-platforms"
|
|
||||||
echo -e " $ build --list-actions <platform>"
|
|
||||||
echo -e " $ build [-k/--keep-artifacts] [-b/--web-branch <web_branch>] <platform> <action>"
|
|
||||||
echo -e ""
|
|
||||||
echo -e "The 'keep-artifacts' option preserves build artifacts, e.g. Docker images for system package builds."
|
|
||||||
echo -e "The web_branch defaults to the same branch name as the current main branch or can be 'local' to not touch the submodule branching."
|
|
||||||
echo -e "To build all platforms, use 'all'."
|
|
||||||
echo -e "To perform all build actions, use 'all'."
|
|
||||||
echo -e "Build output files are collected at '../bin/<platform>'."
|
|
||||||
}
|
|
||||||
|
|
||||||
# Show usage on stderr with exit 1 on argless
|
|
||||||
if [[ -z $1 ]]; then
|
|
||||||
usage >&2
|
|
||||||
exit 1
|
|
||||||
fi
|
|
||||||
# Show usage if -h or --help are specified in the args
|
|
||||||
if [[ $@ =~ '-h' || $@ =~ '--help' ]]; then
|
|
||||||
usage
|
|
||||||
exit 0
|
|
||||||
fi
|
|
||||||
|
|
||||||
# List all available platforms then exit
|
|
||||||
if [[ $1 == '--list-platforms' ]]; then
|
|
||||||
echo -e "Available platforms:"
|
|
||||||
for platform in ${platforms[@]}; do
|
|
||||||
echo -e " ${platform}"
|
|
||||||
done
|
|
||||||
exit 0
|
|
||||||
fi
|
|
||||||
|
|
||||||
# List all available actions for a given platform then exit
|
|
||||||
if [[ $1 == '--list-actions' ]]; then
|
|
||||||
platform="$2"
|
|
||||||
if [[ ! " ${platforms[@]} " =~ " ${platform} " ]]; then
|
|
||||||
echo "ERROR: Platform ${platform} does not exist."
|
|
||||||
exit 1
|
|
||||||
fi
|
|
||||||
echo -e "Available actions for platform ${platform}:"
|
|
||||||
for action in ${actions[@]}; do
|
|
||||||
if [[ -f deployment/${platform}/${action}.sh ]]; then
|
|
||||||
echo -e " ${action}"
|
|
||||||
fi
|
|
||||||
done
|
|
||||||
exit 0
|
|
||||||
fi
|
|
||||||
|
|
||||||
# Parse keep-artifacts option
|
|
||||||
if [[ $1 == '-k' || $1 == '--keep-artifacts' ]]; then
|
|
||||||
keep_artifacts="y"
|
|
||||||
shift 1
|
|
||||||
else
|
|
||||||
keep_artifacts="n"
|
|
||||||
fi
|
|
||||||
|
|
||||||
# Parse branch option
|
|
||||||
if [[ $1 == '-b' || $1 == '--web-branch' ]]; then
|
|
||||||
web_branch="$2"
|
|
||||||
shift 2
|
|
||||||
else
|
|
||||||
web_branch="$( git branch 2>/dev/null | sed -e '/^[^*]/d' -e 's/* \(.*\)/\1/' )"
|
|
||||||
fi
|
|
||||||
|
|
||||||
# Parse platform option
|
|
||||||
if [[ -n $1 ]]; then
|
|
||||||
cli_platform="$1"
|
|
||||||
shift
|
|
||||||
else
|
|
||||||
echo "ERROR: A platform must be specified. Use 'all' to specify all platforms."
|
|
||||||
exit 1
|
|
||||||
fi
|
|
||||||
if [[ ${cli_platform} == 'all' ]]; then
|
|
||||||
declare -a platform=( ${platforms[@]} )
|
|
||||||
else
|
|
||||||
if [[ ! " ${platforms[@]} " =~ " ${cli_platform} " ]]; then
|
|
||||||
echo "ERROR: Platform ${cli_platform} is invalid. Use the '--list-platforms' option to list available platforms."
|
|
||||||
exit 1
|
|
||||||
else
|
|
||||||
declare -a platform=( "${cli_platform}" )
|
|
||||||
fi
|
|
||||||
fi
|
|
||||||
|
|
||||||
# Parse action option
|
|
||||||
if [[ -n $1 ]]; then
|
|
||||||
cli_action="$1"
|
|
||||||
shift
|
|
||||||
else
|
|
||||||
echo "ERROR: An action must be specified. Use 'all' to specify all actions."
|
|
||||||
exit 1
|
|
||||||
fi
|
|
||||||
if [[ ${cli_action} == 'all' ]]; then
|
|
||||||
declare -a action=( ${actions[@]} )
|
|
||||||
else
|
|
||||||
if [[ ! " ${actions[@]} " =~ " ${cli_action} " ]]; then
|
|
||||||
echo "ERROR: Action ${cli_action} is invalid. Use the '--list-actions <platform>' option to list available actions."
|
|
||||||
exit 1
|
|
||||||
else
|
|
||||||
declare -a action=( "${cli_action}" )
|
|
||||||
fi
|
|
||||||
fi
|
|
||||||
|
|
||||||
# Verify required utilities are installed
|
|
||||||
missing_deps=()
|
|
||||||
for utility in ${dependencies[@]}; do
|
|
||||||
if ! which ${utility} &>/dev/null; then
|
|
||||||
missing_deps+=( ${utility} )
|
|
||||||
fi
|
|
||||||
done
|
|
||||||
|
|
||||||
# Error if we're missing anything
|
|
||||||
if [[ ${#missing_deps[@]} -gt 0 ]]; then
|
|
||||||
echo -e "ERROR: This script requires the following missing utilities:"
|
|
||||||
for utility in ${missing_deps[@]}; do
|
|
||||||
echo -e " ${utility}"
|
|
||||||
done
|
|
||||||
exit 1
|
|
||||||
fi
|
|
||||||
|
|
||||||
# Parse platform-specific dependencies
|
|
||||||
for target_platform in ${platform[@]}; do
|
|
||||||
# Read platform-specific dependencies
|
|
||||||
if [[ -f deployment/${target_platform}/dependencies.txt ]]; then
|
|
||||||
platform_dependencies="$( grep -v '^#' deployment/${target_platform}/dependencies.txt )"
|
|
||||||
|
|
||||||
# Verify required utilities are installed
|
|
||||||
missing_deps=()
|
|
||||||
for utility in ${platform_dependencies[@]}; do
|
|
||||||
if ! which ${utility} &>/dev/null; then
|
|
||||||
missing_deps+=( ${utility} )
|
|
||||||
fi
|
|
||||||
done
|
|
||||||
|
|
||||||
# Error if we're missing anything
|
|
||||||
if [[ ${#missing_deps[@]} -gt 0 ]]; then
|
|
||||||
echo -e "ERROR: The ${target_platform} platform requires the following utilities:"
|
|
||||||
for utility in ${missing_deps[@]}; do
|
|
||||||
echo -e " ${utility}"
|
|
||||||
done
|
|
||||||
exit 1
|
|
||||||
fi
|
|
||||||
fi
|
|
||||||
done
|
|
||||||
|
|
||||||
# Execute each platform and action in order, if said action is enabled
|
|
||||||
pushd deployment/
|
|
||||||
for target_platform in ${platform[@]}; do
|
|
||||||
echo -e "> Processing platform ${target_platform}"
|
|
||||||
date_start=$( date +%s )
|
|
||||||
pushd ${target_platform}
|
|
||||||
cleanup() {
|
|
||||||
echo -e ">> Processing action clean"
|
|
||||||
if [[ -f clean.sh && -x clean.sh ]]; then
|
|
||||||
./clean.sh ${keep_artifacts}
|
|
||||||
fi
|
|
||||||
}
|
|
||||||
trap cleanup EXIT INT
|
|
||||||
for target_action in ${action[@]}; do
|
|
||||||
echo -e ">> Processing action ${target_action}"
|
|
||||||
if [[ -f ${target_action}.sh && -x ${target_action}.sh ]]; then
|
|
||||||
./${target_action}.sh web_branch=${web_branch}
|
|
||||||
fi
|
|
||||||
done
|
|
||||||
if [[ -d pkg-dist/ ]]; then
|
|
||||||
echo -e ">> Collecting build artifacts"
|
|
||||||
target_dir="../../../bin/${target_platform}"
|
|
||||||
mkdir -p ${target_dir}
|
|
||||||
mv pkg-dist/* ${target_dir}/
|
|
||||||
fi
|
|
||||||
cleanup
|
|
||||||
date_end=$( date +%s )
|
|
||||||
echo -e "> Completed platform ${target_platform} in $( expr ${date_end} - ${date_start} ) seconds."
|
|
||||||
popd
|
|
||||||
done
|
|
||||||
popd
|
|
@ -0,0 +1,114 @@
|
|||||||
|
#!/usr/bin/env bash
|
||||||
|
|
||||||
|
# build.sh - Build Jellyfin binary packages
|
||||||
|
# Part of the Jellyfin Project
|
||||||
|
|
||||||
|
set -o errexit
|
||||||
|
set -o pipefail
|
||||||
|
|
||||||
|
usage() {
|
||||||
|
echo -e "build.sh - Build Jellyfin binary packages"
|
||||||
|
echo -e "Usage:"
|
||||||
|
echo -e " $0 -t/--type <BUILD_TYPE> -p/--platform <PLATFORM> [-k/--keep-artifacts] [-l/--list-platforms]"
|
||||||
|
echo -e "Notes:"
|
||||||
|
echo -e " * BUILD_TYPE can be one of: [native, docker] and must be specified"
|
||||||
|
echo -e " * native: Build using the build script in the host OS"
|
||||||
|
echo -e " * docker: Build using the build script in a standardized Docker container"
|
||||||
|
echo -e " * PLATFORM can be any platform shown by -l/--list-platforms and must be specified"
|
||||||
|
echo -e " * If -k/--keep-artifacts is specified, transient artifacts (e.g. Docker containers) will be"
|
||||||
|
echo -e " retained after the build is finished; the source directory will still be cleaned"
|
||||||
|
echo -e " * If -l/--list-platforms is specified, all other arguments are ignored; the script will print"
|
||||||
|
echo -e " the list of supported platforms and exit"
|
||||||
|
}
|
||||||
|
|
||||||
|
list_platforms() {
|
||||||
|
declare -a platforms
|
||||||
|
platforms=(
|
||||||
|
$( find deployment -maxdepth 1 -mindepth 1 -name "build.*" | awk -F'.' '{ $1=""; printf $2; if ($3 != ""){ printf "." $3; }; if ($4 != ""){ printf "." $4; }; print ""; }' | sort )
|
||||||
|
)
|
||||||
|
echo -e "Valid platforms:"
|
||||||
|
echo
|
||||||
|
for platform in ${platforms[@]}; do
|
||||||
|
echo -e "* ${platform} : $( grep '^#=' deployment/build.${platform} | sed 's/^#= //' )"
|
||||||
|
done
|
||||||
|
}
|
||||||
|
|
||||||
|
do_build_native() {
|
||||||
|
if [[ ! -f $( which dpkg ) || $( dpkg --print-architecture | head -1 ) != "${PLATFORM##*.}" ]]; then
|
||||||
|
echo "Cross-building is not supported for native builds, use 'docker' builds on amd64 for cross-building."
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
export IS_DOCKER=NO
|
||||||
|
deployment/build.${PLATFORM}
|
||||||
|
}
|
||||||
|
|
||||||
|
do_build_docker() {
|
||||||
|
if [[ -f $( which dpkg ) && $( dpkg --print-architecture | head -1 ) != "amd64" ]]; then
|
||||||
|
echo "Docker-based builds only support amd64-based cross-building; use a 'native' build instead."
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
if [[ ! -f deployment/Dockerfile.${PLATFORM} ]]; then
|
||||||
|
echo "Missing Dockerfile for platform ${PLATFORM}"
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
if [[ ${KEEP_ARTIFACTS} == YES ]]; then
|
||||||
|
docker_args=""
|
||||||
|
else
|
||||||
|
docker_args="--rm"
|
||||||
|
fi
|
||||||
|
|
||||||
|
docker build . -t "jellyfin-builder.${PLATFORM}" -f deployment/Dockerfile.${PLATFORM}
|
||||||
|
mkdir -p ${ARTIFACT_DIR}
|
||||||
|
docker run $docker_args -v "${SOURCE_DIR}:/jellyfin" -v "${ARTIFACT_DIR}:/dist" "jellyfin-builder.${PLATFORM}"
|
||||||
|
}
|
||||||
|
|
||||||
|
while [[ $# -gt 0 ]]; do
|
||||||
|
key="$1"
|
||||||
|
case $key in
|
||||||
|
-t|--type)
|
||||||
|
BUILD_TYPE="$2"
|
||||||
|
shift # past argument
|
||||||
|
shift # past value
|
||||||
|
;;
|
||||||
|
-p|--platform)
|
||||||
|
PLATFORM="$2"
|
||||||
|
shift # past argument
|
||||||
|
shift # past value
|
||||||
|
;;
|
||||||
|
-k|--keep-artifacts)
|
||||||
|
KEEP_ARTIFACTS=YES
|
||||||
|
shift # past argument
|
||||||
|
;;
|
||||||
|
-l|--list-platforms)
|
||||||
|
list_platforms
|
||||||
|
exit 0
|
||||||
|
;;
|
||||||
|
-h|--help)
|
||||||
|
usage
|
||||||
|
exit 0
|
||||||
|
;;
|
||||||
|
*) # unknown option
|
||||||
|
echo "Unknown option $1"
|
||||||
|
usage
|
||||||
|
exit 1
|
||||||
|
;;
|
||||||
|
esac
|
||||||
|
done
|
||||||
|
|
||||||
|
if [[ -z ${BUILD_TYPE} || -z ${PLATFORM} ]]; then
|
||||||
|
usage
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
|
||||||
|
export SOURCE_DIR="$( pwd )"
|
||||||
|
export ARTIFACT_DIR="${SOURCE_DIR}/../bin/${PLATFORM}"
|
||||||
|
|
||||||
|
# Determine build type
|
||||||
|
case ${BUILD_TYPE} in
|
||||||
|
native)
|
||||||
|
do_build_native
|
||||||
|
;;
|
||||||
|
docker)
|
||||||
|
do_build_docker
|
||||||
|
;;
|
||||||
|
esac
|
@ -1,3 +1,9 @@
|
|||||||
|
jellyfin-server (10.6.0-1) unstable; urgency=medium
|
||||||
|
|
||||||
|
* Forthcoming stable release
|
||||||
|
|
||||||
|
-- Jellyfin Packaging Team <packaging@jellyfin.org> Mon, 23 Mar 2020 14:46:05 -0400
|
||||||
|
|
||||||
jellyfin (10.5.0-1) unstable; urgency=medium
|
jellyfin (10.5.0-1) unstable; urgency=medium
|
||||||
|
|
||||||
* New upstream version 10.5.0; release changelog at https://github.com/jellyfin/jellyfin/releases/tag/v10.5.0
|
* New upstream version 10.5.0; release changelog at https://github.com/jellyfin/jellyfin/releases/tag/v10.5.0
|
@ -0,0 +1,13 @@
|
|||||||
|
Source: jellyfin
|
||||||
|
Section: misc
|
||||||
|
Priority: optional
|
||||||
|
Homepage: https://jellyfin.org
|
||||||
|
Standards-Version: 3.9.2
|
||||||
|
|
||||||
|
Package: jellyfin
|
||||||
|
Version: 10.6.0
|
||||||
|
Maintainer: Jellyfin Packaging Team <packaging@jellyfin.org>
|
||||||
|
Depends: jellyfin-server, jellyfin-web
|
||||||
|
Description: Provides the Jellyfin Free Software Media System
|
||||||
|
Provides the full Jellyfin experience, including both the server and web interface.
|
||||||
|
|
@ -0,0 +1,32 @@
|
|||||||
|
FROM centos:7
|
||||||
|
# Docker build arguments
|
||||||
|
ARG SOURCE_DIR=/jellyfin
|
||||||
|
ARG ARTIFACT_DIR=/dist
|
||||||
|
ARG SDK_VERSION=3.1
|
||||||
|
# Docker run environment
|
||||||
|
ENV SOURCE_DIR=/jellyfin
|
||||||
|
ENV ARTIFACT_DIR=/dist
|
||||||
|
ENV IS_DOCKER=YES
|
||||||
|
|
||||||
|
# Prepare CentOS environment
|
||||||
|
RUN yum update -y \
|
||||||
|
&& yum install -y epel-release \
|
||||||
|
&& yum install -y @buildsys-build rpmdevtools yum-plugins-core libcurl-devel fontconfig-devel freetype-devel openssl-devel glibc-devel libicu-devel git
|
||||||
|
|
||||||
|
# Install DotNET SDK
|
||||||
|
RUN rpm -Uvh https://packages.microsoft.com/config/rhel/7/packages-microsoft-prod.rpm \
|
||||||
|
&& rpmdev-setuptree \
|
||||||
|
&& yum install -y dotnet-sdk-${SDK_VERSION}
|
||||||
|
|
||||||
|
# Create symlinks and directories
|
||||||
|
RUN ln -sf ${SOURCE_DIR}/deployment/build.centos.amd64 /build.sh \
|
||||||
|
&& mkdir -p ${SOURCE_DIR}/SPECS \
|
||||||
|
&& ln -s ${SOURCE_DIR}/fedora/jellyfin.spec ${SOURCE_DIR}/SPECS/jellyfin.spec \
|
||||||
|
&& mkdir -p ${SOURCE_DIR}/SOURCES \
|
||||||
|
&& ln -s ${SOURCE_DIR}/fedora ${SOURCE_DIR}/SOURCES
|
||||||
|
|
||||||
|
VOLUME ${SOURCE_DIR}/
|
||||||
|
|
||||||
|
VOLUME ${ARTIFACT_DIR}/
|
||||||
|
|
||||||
|
ENTRYPOINT ["/build.sh"]
|
@ -0,0 +1,31 @@
|
|||||||
|
FROM debian:10
|
||||||
|
# Docker build arguments
|
||||||
|
ARG SOURCE_DIR=/jellyfin
|
||||||
|
ARG ARTIFACT_DIR=/dist
|
||||||
|
ARG SDK_VERSION=3.1
|
||||||
|
# Docker run environment
|
||||||
|
ENV SOURCE_DIR=/jellyfin
|
||||||
|
ENV ARTIFACT_DIR=/dist
|
||||||
|
ENV DEB_BUILD_OPTIONS=noddebs
|
||||||
|
ENV ARCH=amd64
|
||||||
|
ENV IS_DOCKER=YES
|
||||||
|
|
||||||
|
# Prepare Debian build environment
|
||||||
|
RUN apt-get update \
|
||||||
|
&& apt-get install -y apt-transport-https debhelper gnupg wget devscripts mmv libc6-dev libcurl4-openssl-dev libfontconfig1-dev libfreetype6-dev libssl-dev libssl1.1 liblttng-ust0
|
||||||
|
|
||||||
|
# Install dotnet repository
|
||||||
|
# https://dotnet.microsoft.com/download/linux-package-manager/debian9/sdk-current
|
||||||
|
RUN wget https://download.visualstudio.microsoft.com/download/pr/d731f991-8e68-4c7c-8ea0-fad5605b077a/49497b5420eecbd905158d86d738af64/dotnet-sdk-3.1.100-linux-x64.tar.gz -O dotnet-sdk.tar.gz \
|
||||||
|
&& mkdir -p dotnet-sdk \
|
||||||
|
&& tar -xzf dotnet-sdk.tar.gz -C dotnet-sdk \
|
||||||
|
&& ln -s $( pwd )/dotnet-sdk/dotnet /usr/bin/dotnet
|
||||||
|
|
||||||
|
# Link to build script
|
||||||
|
RUN ln -sf ${SOURCE_DIR}/deployment/build.debian.amd64 /build.sh
|
||||||
|
|
||||||
|
VOLUME ${SOURCE_DIR}/
|
||||||
|
|
||||||
|
VOLUME ${ARTIFACT_DIR}/
|
||||||
|
|
||||||
|
ENTRYPOINT ["/build.sh"]
|
@ -0,0 +1,31 @@
|
|||||||
|
FROM ubuntu:bionic
|
||||||
|
# Docker build arguments
|
||||||
|
ARG SOURCE_DIR=/jellyfin
|
||||||
|
ARG ARTIFACT_DIR=/dist
|
||||||
|
ARG SDK_VERSION=3.1
|
||||||
|
# Docker run environment
|
||||||
|
ENV SOURCE_DIR=/jellyfin
|
||||||
|
ENV ARTIFACT_DIR=/dist
|
||||||
|
ENV DEB_BUILD_OPTIONS=noddebs
|
||||||
|
ENV ARCH=amd64
|
||||||
|
ENV IS_DOCKER=YES
|
||||||
|
|
||||||
|
# Prepare Debian build environment
|
||||||
|
RUN apt-get update \
|
||||||
|
&& apt-get install -y apt-transport-https debhelper gnupg wget devscripts mmv libc6-dev libcurl4-openssl-dev libfontconfig1-dev libfreetype6-dev libssl-dev libssl1.1 liblttng-ust0
|
||||||
|
|
||||||
|
# Install dotnet repository
|
||||||
|
# https://dotnet.microsoft.com/download/linux-package-manager/debian9/sdk-current
|
||||||
|
RUN wget https://download.visualstudio.microsoft.com/download/pr/d731f991-8e68-4c7c-8ea0-fad5605b077a/49497b5420eecbd905158d86d738af64/dotnet-sdk-3.1.100-linux-x64.tar.gz -O dotnet-sdk.tar.gz \
|
||||||
|
&& mkdir -p dotnet-sdk \
|
||||||
|
&& tar -xzf dotnet-sdk.tar.gz -C dotnet-sdk \
|
||||||
|
&& ln -s $( pwd )/dotnet-sdk/dotnet /usr/bin/dotnet
|
||||||
|
|
||||||
|
# Link to build script
|
||||||
|
RUN ln -sf ${SOURCE_DIR}/deployment/build.ubuntu.amd64 /build.sh
|
||||||
|
|
||||||
|
VOLUME ${SOURCE_DIR}/
|
||||||
|
|
||||||
|
VOLUME ${ARTIFACT_DIR}/
|
||||||
|
|
||||||
|
ENTRYPOINT ["/build.sh"]
|
@ -1,62 +0,0 @@
|
|||||||
# Jellyfin Packaging
|
|
||||||
|
|
||||||
This directory contains the packaging configuration of Jellyfin for multiple platforms. The specification is below; all package platforms must follow the specification to be compatable with the central `build` script.
|
|
||||||
|
|
||||||
## Package List
|
|
||||||
|
|
||||||
### Operating System Packages
|
|
||||||
|
|
||||||
* `debian-package-x64`: Package for Debian and Ubuntu amd64 systems.
|
|
||||||
* `fedora-package-x64`: Package for Fedora, CentOS, and Red Hat Enterprise Linux amd64 systems.
|
|
||||||
|
|
||||||
### Portable Builds (archives)
|
|
||||||
|
|
||||||
* `linux-x64`: Portable binary archive for generic Linux amd64 systems.
|
|
||||||
* `macos`: Portable binary archive for MacOS amd64 systems.
|
|
||||||
* `win-x64`: Portable binary archive for Windows amd64 systems.
|
|
||||||
* `win-x86`: Portable binary archive for Windows i386 systems.
|
|
||||||
|
|
||||||
### Other Builds
|
|
||||||
|
|
||||||
These builds are not necessarily run from the `build` script, but are present for other platforms.
|
|
||||||
|
|
||||||
* `portable`: Compiled `.dll` for use with .NET Core runtime on any system.
|
|
||||||
* `docker`: Docker manifests for auto-publishing.
|
|
||||||
* `unraid`: unRaid Docker template; not built by `build` but imported into unRaid directly.
|
|
||||||
* `windows`: Support files and scripts for Windows CI build.
|
|
||||||
|
|
||||||
## Package Specification
|
|
||||||
|
|
||||||
### Dependencies
|
|
||||||
|
|
||||||
* If a platform requires additional build dependencies, the required binary names, i.e. to validate `which <binary>`, should be specified in a `dependencies.txt` file inside the platform directory.
|
|
||||||
|
|
||||||
* Each dependency should be present on its own line.
|
|
||||||
|
|
||||||
### Action Scripts
|
|
||||||
|
|
||||||
* Actions are defined in BASH scripts with the name `<action>.sh` within the platform directory.
|
|
||||||
|
|
||||||
* The list of valid actions are:
|
|
||||||
|
|
||||||
1. `build`: Builds a set of binaries.
|
|
||||||
2. `package`: Assembles the compiled binaries into a package.
|
|
||||||
3. `sign`: Performs signing actions on a package.
|
|
||||||
4. `publish`: Performs a publishing action for a package.
|
|
||||||
5. `clean`: Cleans up any artifacts from the previous actions.
|
|
||||||
|
|
||||||
* All package actions are optional, however at least one should generate output files, and any that do should contain a `clean` action.
|
|
||||||
|
|
||||||
* Actions are executed in the order specified above, and later actions may depend on former actions.
|
|
||||||
|
|
||||||
* Actions except for `clean` should `set -o errexit` to terminate on failed actions.
|
|
||||||
|
|
||||||
* The `clean` action should always `exit 0` even if no work is done or it fails.
|
|
||||||
|
|
||||||
* The `clean` action can be passed a variable as argument 1, named `keep_artifacts`, containing either the value `y` or `n`. It is indended to handle situations when the user runs `build --keep-artifacts` and should be handled intelligently. Usually, this is used to preserve Docker images while still removing temporary directories.
|
|
||||||
|
|
||||||
### Output Files
|
|
||||||
|
|
||||||
* Upon completion of the defined actions, at least one output file must be created in the `<platform>/pkg-dist` directory.
|
|
||||||
|
|
||||||
* Output files will be moved to the directory `jellyfin-build/<platform>` one directory above the repository root upon completion.
|
|
@ -0,0 +1,24 @@
|
|||||||
|
#!/bin/bash
|
||||||
|
|
||||||
|
#= CentOS/RHEL 7+ amd64 .rpm
|
||||||
|
|
||||||
|
set -o errexit
|
||||||
|
set -o xtrace
|
||||||
|
|
||||||
|
# Move to source directory
|
||||||
|
pushd ${SOURCE_DIR}
|
||||||
|
|
||||||
|
# Build RPM
|
||||||
|
make -f fedora/Makefile srpm outdir=/root/rpmbuild/SRPMS
|
||||||
|
rpmbuild --rebuild -bb /root/rpmbuild/SRPMS/jellyfin-*.src.rpm
|
||||||
|
|
||||||
|
# Move the artifacts out
|
||||||
|
mv /root/rpmbuild/RPMS/x86_64/jellyfin-*.rpm /root/rpmbuild/SRPMS/jellyfin-*.src.rpm ${ARTIFACT_DIR}/
|
||||||
|
|
||||||
|
if [[ ${IS_DOCKER} == YES ]]; then
|
||||||
|
chown -Rc $(stat -c %u:%g ${ARTIFACT_DIR}) ${ARTIFACT_DIR}
|
||||||
|
fi
|
||||||
|
|
||||||
|
rm -f fedora/jellyfin*.tar.gz
|
||||||
|
|
||||||
|
popd
|
@ -0,0 +1,28 @@
|
|||||||
|
#!/bin/bash
|
||||||
|
|
||||||
|
#= Debian 10+ amd64 .deb
|
||||||
|
|
||||||
|
set -o errexit
|
||||||
|
set -o xtrace
|
||||||
|
|
||||||
|
# Move to source directory
|
||||||
|
pushd ${SOURCE_DIR}
|
||||||
|
|
||||||
|
if [[ ${IS_DOCKER} == YES ]]; then
|
||||||
|
# Remove build-dep for dotnet-sdk-3.1, since it's installed manually
|
||||||
|
cp -a debian/control /tmp/control.orig
|
||||||
|
sed -i '/dotnet-sdk-3.1,/d' debian/control
|
||||||
|
fi
|
||||||
|
|
||||||
|
# Build DEB
|
||||||
|
dpkg-buildpackage -us -uc --pre-clean --post-clean
|
||||||
|
|
||||||
|
mkdir -p ${ARTIFACT_DIR}/
|
||||||
|
mv ../jellyfin*.{deb,dsc,tar.gz,buildinfo,changes} ${ARTIFACT_DIR}/
|
||||||
|
|
||||||
|
if [[ ${IS_DOCKER} == YES ]]; then
|
||||||
|
cp -a /tmp/control.orig debian/control
|
||||||
|
chown -Rc $(stat -c %u:%g ${ARTIFACT_DIR}) ${ARTIFACT_DIR}
|
||||||
|
fi
|
||||||
|
|
||||||
|
popd
|
@ -0,0 +1,29 @@
|
|||||||
|
#!/bin/bash
|
||||||
|
|
||||||
|
#= Debian 10+ arm64 .deb
|
||||||
|
|
||||||
|
set -o errexit
|
||||||
|
set -o xtrace
|
||||||
|
|
||||||
|
# Move to source directory
|
||||||
|
pushd ${SOURCE_DIR}
|
||||||
|
|
||||||
|
if [[ ${IS_DOCKER} == YES ]]; then
|
||||||
|
# Remove build-dep for dotnet-sdk-3.1, since it's installed manually
|
||||||
|
cp -a debian/control /tmp/control.orig
|
||||||
|
sed -i '/dotnet-sdk-3.1,/d' debian/control
|
||||||
|
fi
|
||||||
|
|
||||||
|
# Build DEB
|
||||||
|
export CONFIG_SITE=/etc/dpkg-cross/cross-config.${ARCH}
|
||||||
|
dpkg-buildpackage -us -uc -a arm64 --pre-clean --post-clean
|
||||||
|
|
||||||
|
mkdir -p ${ARTIFACT_DIR}/
|
||||||
|
mv ../jellyfin*.{deb,dsc,tar.gz,buildinfo,changes} ${ARTIFACT_DIR}/
|
||||||
|
|
||||||
|
if [[ ${IS_DOCKER} == YES ]]; then
|
||||||
|
cp -a /tmp/control.orig debian/control
|
||||||
|
chown -Rc $(stat -c %u:%g ${ARTIFACT_DIR}) ${ARTIFACT_DIR}
|
||||||
|
fi
|
||||||
|
|
||||||
|
popd
|
@ -0,0 +1,29 @@
|
|||||||
|
#!/bin/bash
|
||||||
|
|
||||||
|
#= Debian 10+ arm64 .deb
|
||||||
|
|
||||||
|
set -o errexit
|
||||||
|
set -o xtrace
|
||||||
|
|
||||||
|
# Move to source directory
|
||||||
|
pushd ${SOURCE_DIR}
|
||||||
|
|
||||||
|
if [[ ${IS_DOCKER} == YES ]]; then
|
||||||
|
# Remove build-dep for dotnet-sdk-3.1, since it's installed manually
|
||||||
|
cp -a debian/control /tmp/control.orig
|
||||||
|
sed -i '/dotnet-sdk-3.1,/d' debian/control
|
||||||
|
fi
|
||||||
|
|
||||||
|
# Build DEB
|
||||||
|
export CONFIG_SITE=/etc/dpkg-cross/cross-config.${ARCH}
|
||||||
|
dpkg-buildpackage -us -uc -a armhf --pre-clean --post-clean
|
||||||
|
|
||||||
|
mkdir -p ${ARTIFACT_DIR}/
|
||||||
|
mv ../jellyfin*.{deb,dsc,tar.gz,buildinfo,changes} ${ARTIFACT_DIR}/
|
||||||
|
|
||||||
|
if [[ ${IS_DOCKER} == YES ]]; then
|
||||||
|
cp -a /tmp/control.orig debian/control
|
||||||
|
chown -Rc $(stat -c %u:%g ${ARTIFACT_DIR}) ${ARTIFACT_DIR}
|
||||||
|
fi
|
||||||
|
|
||||||
|
popd
|
@ -0,0 +1,24 @@
|
|||||||
|
#!/bin/bash
|
||||||
|
|
||||||
|
#= Fedora 29+ amd64 .rpm
|
||||||
|
|
||||||
|
set -o errexit
|
||||||
|
set -o xtrace
|
||||||
|
|
||||||
|
# Move to source directory
|
||||||
|
pushd ${SOURCE_DIR}
|
||||||
|
|
||||||
|
# Build RPM
|
||||||
|
make -f fedora/Makefile srpm outdir=/root/rpmbuild/SRPMS
|
||||||
|
rpmbuild -rb /root/rpmbuild/SRPMS/jellyfin-*.src.rpm
|
||||||
|
|
||||||
|
# Move the artifacts out
|
||||||
|
mv /root/rpmbuild/RPMS/x86_64/jellyfin-*.rpm /root/rpmbuild/SRPMS/jellyfin-*.src.rpm ${ARTIFACT_DIR}/
|
||||||
|
|
||||||
|
if [[ ${IS_DOCKER} == YES ]]; then
|
||||||
|
chown -Rc $(stat -c %u:%g ${ARTIFACT_DIR}) ${ARTIFACT_DIR}
|
||||||
|
fi
|
||||||
|
|
||||||
|
rm -f fedora/jellyfin*.tar.gz
|
||||||
|
|
||||||
|
popd
|
@ -0,0 +1,27 @@
|
|||||||
|
#!/bin/bash
|
||||||
|
|
||||||
|
#= Generic Linux amd64 .tar.gz
|
||||||
|
|
||||||
|
set -o errexit
|
||||||
|
set -o xtrace
|
||||||
|
|
||||||
|
# Move to source directory
|
||||||
|
pushd ${SOURCE_DIR}
|
||||||
|
|
||||||
|
# Get version
|
||||||
|
version="$( grep "version:" ./build.yaml | sed -E 's/version: "([0-9\.]+.*)"/\1/' )"
|
||||||
|
|
||||||
|
# Build archives
|
||||||
|
dotnet publish Jellyfin.Server --configuration Release --self-contained --runtime linux-x64 --output dist/jellyfin-server_${version}/ "-p:GenerateDocumentationFile=false;DebugSymbols=false;DebugType=none;UseAppHost=true"
|
||||||
|
tar -czf jellyfin-server_${version}_linux-amd64.tar.gz -C dist jellyfin-server_${version}
|
||||||
|
rm -rf dist/jellyfin-server_${version}
|
||||||
|
|
||||||
|
# Move the artifacts out
|
||||||
|
mkdir -p ${ARTIFACT_DIR}/
|
||||||
|
mv jellyfin[-_]*.tar.gz ${ARTIFACT_DIR}/
|
||||||
|
|
||||||
|
if [[ ${IS_DOCKER} == YES ]]; then
|
||||||
|
chown -Rc $(stat -c %u:%g ${ARTIFACT_DIR}) ${ARTIFACT_DIR}
|
||||||
|
fi
|
||||||
|
|
||||||
|
popd
|
@ -0,0 +1,27 @@
|
|||||||
|
#!/bin/bash
|
||||||
|
|
||||||
|
#= MacOS 10.13+ .tar.gz
|
||||||
|
|
||||||
|
set -o errexit
|
||||||
|
set -o xtrace
|
||||||
|
|
||||||
|
# Move to source directory
|
||||||
|
pushd ${SOURCE_DIR}
|
||||||
|
|
||||||
|
# Get version
|
||||||
|
version="$( grep "version:" ./build.yaml | sed -E 's/version: "([0-9\.]+.*)"/\1/' )"
|
||||||
|
|
||||||
|
# Build archives
|
||||||
|
dotnet publish Jellyfin.Server --configuration Release --self-contained --runtime osx-x64 --output dist/jellyfin-server_${version}/ "-p:GenerateDocumentationFile=false;DebugSymbols=false;DebugType=none;UseAppHost=true"
|
||||||
|
tar -czf jellyfin-server_${version}_macos-amd64.tar.gz -C dist jellyfin-server_${version}
|
||||||
|
rm -rf dist/jellyfin-server_${version}
|
||||||
|
|
||||||
|
# Move the artifacts out
|
||||||
|
mkdir -p ${ARTIFACT_DIR}/
|
||||||
|
mv jellyfin[-_]*.tar.gz ${ARTIFACT_DIR}/
|
||||||
|
|
||||||
|
if [[ ${IS_DOCKER} == YES ]]; then
|
||||||
|
chown -Rc $(stat -c %u:%g ${ARTIFACT_DIR}) ${ARTIFACT_DIR}
|
||||||
|
fi
|
||||||
|
|
||||||
|
popd
|
@ -0,0 +1,27 @@
|
|||||||
|
#!/bin/bash
|
||||||
|
|
||||||
|
#= Portable .NET DLL .tar.gz
|
||||||
|
|
||||||
|
set -o errexit
|
||||||
|
set -o xtrace
|
||||||
|
|
||||||
|
# Move to source directory
|
||||||
|
pushd ${SOURCE_DIR}
|
||||||
|
|
||||||
|
# Get version
|
||||||
|
version="$( grep "version:" ./build.yaml | sed -E 's/version: "([0-9\.]+.*)"/\1/' )"
|
||||||
|
|
||||||
|
# Build archives
|
||||||
|
dotnet publish Jellyfin.Server --configuration Release --output dist/jellyfin-server_${version}/ "-p:GenerateDocumentationFile=false;DebugSymbols=false;DebugType=none;UseAppHost=true"
|
||||||
|
tar -czf jellyfin-server_${version}_portable.tar.gz -C dist jellyfin-server_${version}
|
||||||
|
rm -rf dist/jellyfin-server_${version}
|
||||||
|
|
||||||
|
# Move the artifacts out
|
||||||
|
mkdir -p ${ARTIFACT_DIR}/
|
||||||
|
mv jellyfin[-_]*.tar.gz ${ARTIFACT_DIR}/
|
||||||
|
|
||||||
|
if [[ ${IS_DOCKER} == YES ]]; then
|
||||||
|
chown -Rc $(stat -c %u:%g ${ARTIFACT_DIR}) ${ARTIFACT_DIR}
|
||||||
|
fi
|
||||||
|
|
||||||
|
popd
|
@ -0,0 +1,28 @@
|
|||||||
|
#!/bin/bash
|
||||||
|
|
||||||
|
#= Ubuntu 18.04+ amd64 .deb
|
||||||
|
|
||||||
|
set -o errexit
|
||||||
|
set -o xtrace
|
||||||
|
|
||||||
|
# Move to source directory
|
||||||
|
pushd ${SOURCE_DIR}
|
||||||
|
|
||||||
|
if [[ ${IS_DOCKER} == YES ]]; then
|
||||||
|
# Remove build-dep for dotnet-sdk-3.1, since it's installed manually
|
||||||
|
cp -a debian/control /tmp/control.orig
|
||||||
|
sed -i '/dotnet-sdk-3.1,/d' debian/control
|
||||||
|
fi
|
||||||
|
|
||||||
|
# Build DEB
|
||||||
|
dpkg-buildpackage -us -uc --pre-clean --post-clean
|
||||||
|
|
||||||
|
mkdir -p ${ARTIFACT_DIR}/
|
||||||
|
mv ../jellyfin*.{deb,dsc,tar.gz,buildinfo,changes} ${ARTIFACT_DIR}/
|
||||||
|
|
||||||
|
if [[ ${IS_DOCKER} == YES ]]; then
|
||||||
|
cp -a /tmp/control.orig debian/control
|
||||||
|
chown -Rc $(stat -c %u:%g ${ARTIFACT_DIR}) ${ARTIFACT_DIR}
|
||||||
|
fi
|
||||||
|
|
||||||
|
popd
|
@ -0,0 +1,29 @@
|
|||||||
|
#!/bin/bash
|
||||||
|
|
||||||
|
#= Ubuntu 18.04+ arm64 .deb
|
||||||
|
|
||||||
|
set -o errexit
|
||||||
|
set -o xtrace
|
||||||
|
|
||||||
|
# Move to source directory
|
||||||
|
pushd ${SOURCE_DIR}
|
||||||
|
|
||||||
|
if [[ ${IS_DOCKER} == YES ]]; then
|
||||||
|
# Remove build-dep for dotnet-sdk-3.1, since it's installed manually
|
||||||
|
cp -a debian/control /tmp/control.orig
|
||||||
|
sed -i '/dotnet-sdk-3.1,/d' debian/control
|
||||||
|
fi
|
||||||
|
|
||||||
|
# Build DEB
|
||||||
|
export CONFIG_SITE=/etc/dpkg-cross/cross-config.${ARCH}
|
||||||
|
dpkg-buildpackage -us -uc -a arm64 --pre-clean --post-clean
|
||||||
|
|
||||||
|
mkdir -p ${ARTIFACT_DIR}/
|
||||||
|
mv ../jellyfin*.{deb,dsc,tar.gz,buildinfo,changes} ${ARTIFACT_DIR}/
|
||||||
|
|
||||||
|
if [[ ${IS_DOCKER} == YES ]]; then
|
||||||
|
cp -a /tmp/control.orig debian/control
|
||||||
|
chown -Rc $(stat -c %u:%g ${ARTIFACT_DIR}) ${ARTIFACT_DIR}
|
||||||
|
fi
|
||||||
|
|
||||||
|
popd
|
@ -0,0 +1,29 @@
|
|||||||
|
#!/bin/bash
|
||||||
|
|
||||||
|
#= Ubuntu 18.04+ arm64 .deb
|
||||||
|
|
||||||
|
set -o errexit
|
||||||
|
set -o xtrace
|
||||||
|
|
||||||
|
# Move to source directory
|
||||||
|
pushd ${SOURCE_DIR}
|
||||||
|
|
||||||
|
if [[ ${IS_DOCKER} == YES ]]; then
|
||||||
|
# Remove build-dep for dotnet-sdk-3.1, since it's installed manually
|
||||||
|
cp -a debian/control /tmp/control.orig
|
||||||
|
sed -i '/dotnet-sdk-3.1,/d' debian/control
|
||||||
|
fi
|
||||||
|
|
||||||
|
# Build DEB
|
||||||
|
export CONFIG_SITE=/etc/dpkg-cross/cross-config.${ARCH}
|
||||||
|
dpkg-buildpackage -us -uc -a armhf --pre-clean --post-clean
|
||||||
|
|
||||||
|
mkdir -p ${ARTIFACT_DIR}/
|
||||||
|
mv ../jellyfin*.{deb,dsc,tar.gz,buildinfo,changes} ${ARTIFACT_DIR}/
|
||||||
|
|
||||||
|
if [[ ${IS_DOCKER} == YES ]]; then
|
||||||
|
cp -a /tmp/control.orig debian/control
|
||||||
|
chown -Rc $(stat -c %u:%g ${ARTIFACT_DIR}) ${ARTIFACT_DIR}
|
||||||
|
fi
|
||||||
|
|
||||||
|
popd
|
@ -0,0 +1,54 @@
|
|||||||
|
#!/bin/bash
|
||||||
|
|
||||||
|
#= Windows 7+ amd64 (x64) .zip
|
||||||
|
|
||||||
|
set -o errexit
|
||||||
|
set -o xtrace
|
||||||
|
|
||||||
|
# Version variables
|
||||||
|
NSSM_VERSION="nssm-2.24-101-g897c7ad"
|
||||||
|
NSSM_URL="http://files.evilt.win/nssm/${NSSM_VERSION}.zip"
|
||||||
|
FFMPEG_VERSION="ffmpeg-4.2.1-win64-static"
|
||||||
|
FFMPEG_URL="https://ffmpeg.zeranoe.com/builds/win64/static/${FFMPEG_VERSION}.zip"
|
||||||
|
|
||||||
|
# Move to source directory
|
||||||
|
pushd ${SOURCE_DIR}
|
||||||
|
|
||||||
|
# Get version
|
||||||
|
version="$( grep "version:" ./build.yaml | sed -E 's/version: "([0-9\.]+.*)"/\1/' )"
|
||||||
|
|
||||||
|
output_dir="dist/jellyfin-server_${version}"
|
||||||
|
|
||||||
|
# Build binary
|
||||||
|
dotnet publish Jellyfin.Server --configuration Release --self-contained --runtime win-x64 --output ${output_dir}/ "-p:GenerateDocumentationFile=false;DebugSymbols=false;DebugType=none;UseAppHost=true"
|
||||||
|
|
||||||
|
# Prepare addins
|
||||||
|
addin_build_dir="$( mktemp -d )"
|
||||||
|
wget ${NSSM_URL} -O ${addin_build_dir}/nssm.zip
|
||||||
|
wget ${FFMPEG_URL} -O ${addin_build_dir}/ffmpeg.zip
|
||||||
|
unzip ${addin_build_dir}/nssm.zip -d ${addin_build_dir}
|
||||||
|
cp ${addin_build_dir}/${NSSM_VERSION}/win64/nssm.exe ${output_dir}/nssm.exe
|
||||||
|
unzip ${addin_build_dir}/ffmpeg.zip -d ${addin_build_dir}
|
||||||
|
cp ${addin_build_dir}/${FFMPEG_VERSION}/bin/ffmpeg.exe ${output_dir}/ffmpeg.exe
|
||||||
|
cp ${addin_build_dir}/${FFMPEG_VERSION}/bin/ffprobe.exe ${output_dir}/ffprobe.exe
|
||||||
|
rm -rf ${addin_build_dir}
|
||||||
|
|
||||||
|
# Prepare scripts
|
||||||
|
cp ${SOURCE_DIR}/windows/legacy/install-jellyfin.ps1 ${output_dir}/install-jellyfin.ps1
|
||||||
|
cp ${SOURCE_DIR}/windows/legacy/install.bat ${output_dir}/install.bat
|
||||||
|
|
||||||
|
# Create zip package
|
||||||
|
pushd dist
|
||||||
|
zip -qr jellyfin-server_${version}.portable.zip jellyfin-server_${version}
|
||||||
|
popd
|
||||||
|
rm -rf ${output_dir}
|
||||||
|
|
||||||
|
# Move the artifacts out
|
||||||
|
mkdir -p ${ARTIFACT_DIR}/
|
||||||
|
mv dist/jellyfin[-_]*.zip ${ARTIFACT_DIR}/
|
||||||
|
|
||||||
|
if [[ ${IS_DOCKER} == YES ]]; then
|
||||||
|
chown -Rc $(stat -c %u:%g ${ARTIFACT_DIR}) ${ARTIFACT_DIR}
|
||||||
|
fi
|
||||||
|
|
||||||
|
popd
|
@ -1,39 +0,0 @@
|
|||||||
FROM centos:7
|
|
||||||
# Docker build arguments
|
|
||||||
ARG SOURCE_DIR=/jellyfin
|
|
||||||
ARG PLATFORM_DIR=/jellyfin/deployment/centos-package-x64
|
|
||||||
ARG ARTIFACT_DIR=/dist
|
|
||||||
ARG SDK_VERSION=3.1
|
|
||||||
# Docker run environment
|
|
||||||
ENV SOURCE_DIR=/jellyfin
|
|
||||||
ENV ARTIFACT_DIR=/dist
|
|
||||||
|
|
||||||
# Prepare CentOS environment
|
|
||||||
RUN yum update -y \
|
|
||||||
&& yum install -y epel-release
|
|
||||||
|
|
||||||
# Install build dependencies
|
|
||||||
RUN yum install -y @buildsys-build rpmdevtools yum-plugins-core libcurl-devel fontconfig-devel freetype-devel openssl-devel glibc-devel libicu-devel git
|
|
||||||
|
|
||||||
# Install recent NodeJS and Yarn
|
|
||||||
RUN curl -fSsLo /etc/yum.repos.d/yarn.repo https://dl.yarnpkg.com/rpm/yarn.repo \
|
|
||||||
&& rpm -i https://rpm.nodesource.com/pub_10.x/el/7/x86_64/nodesource-release-el7-1.noarch.rpm \
|
|
||||||
&& yum install -y yarn
|
|
||||||
|
|
||||||
# Install DotNET SDK
|
|
||||||
RUN rpm -Uvh https://packages.microsoft.com/config/rhel/7/packages-microsoft-prod.rpm \
|
|
||||||
&& rpmdev-setuptree \
|
|
||||||
&& yum install -y dotnet-sdk-${SDK_VERSION}
|
|
||||||
|
|
||||||
# Create symlinks and directories
|
|
||||||
RUN ln -sf ${PLATFORM_DIR}/docker-build.sh /docker-build.sh \
|
|
||||||
&& mkdir -p ${SOURCE_DIR}/SPECS \
|
|
||||||
&& ln -s ${PLATFORM_DIR}/pkg-src/jellyfin.spec ${SOURCE_DIR}/SPECS/jellyfin.spec \
|
|
||||||
&& mkdir -p ${SOURCE_DIR}/SOURCES \
|
|
||||||
&& ln -s ${PLATFORM_DIR}/pkg-src ${SOURCE_DIR}/SOURCES
|
|
||||||
|
|
||||||
VOLUME ${ARTIFACT_DIR}/
|
|
||||||
|
|
||||||
COPY . ${SOURCE_DIR}/
|
|
||||||
|
|
||||||
ENTRYPOINT ["/docker-build.sh"]
|
|
@ -1,32 +0,0 @@
|
|||||||
#!/usr/bin/env bash
|
|
||||||
|
|
||||||
keep_artifacts="${1}"
|
|
||||||
|
|
||||||
WORKDIR="$( pwd )"
|
|
||||||
VERSION="$( grep -A1 '^Version:' ${WORKDIR}/pkg-src/jellyfin.spec | awk '{ print $NF }' )"
|
|
||||||
|
|
||||||
package_temporary_dir="${WORKDIR}/pkg-dist-tmp"
|
|
||||||
package_source_dir="${WORKDIR}/pkg-src"
|
|
||||||
output_dir="${WORKDIR}/pkg-dist"
|
|
||||||
current_user="$( whoami )"
|
|
||||||
image_name="jellyfin-centos-build"
|
|
||||||
|
|
||||||
rm -f "${package_source_dir}/jellyfin-${VERSION}.tar.gz" &>/dev/null \
|
|
||||||
|| sudo rm -f "${package_source_dir}/jellyfin-${VERSION}.tar.gz" &>/dev/null
|
|
||||||
|
|
||||||
rm -rf "${package_temporary_dir}" &>/dev/null \
|
|
||||||
|| sudo rm -rf "${package_temporary_dir}" &>/dev/null
|
|
||||||
|
|
||||||
rm -rf "${output_dir}" &>/dev/null \
|
|
||||||
|| sudo rm -rf "${output_dir}" &>/dev/null
|
|
||||||
|
|
||||||
if [[ ${keep_artifacts} == 'n' ]]; then
|
|
||||||
docker_sudo=""
|
|
||||||
if [[ ! -z $(id -Gn | grep -q 'docker') ]] \
|
|
||||||
&& [[ ! ${EUID:-1000} -eq 0 ]] \
|
|
||||||
&& [[ ! ${USER} == "root" ]] \
|
|
||||||
&& [[ ! -z $( echo "${OSTYPE}" | grep -q "darwin" ) ]]; then
|
|
||||||
docker_sudo=sudo
|
|
||||||
fi
|
|
||||||
${docker_sudo} docker image rm ${image_name} --force
|
|
||||||
fi
|
|
@ -1 +0,0 @@
|
|||||||
docker
|
|
@ -1,18 +0,0 @@
|
|||||||
#!/bin/bash
|
|
||||||
|
|
||||||
# Builds the RPM inside the Docker container
|
|
||||||
|
|
||||||
set -o errexit
|
|
||||||
set -o xtrace
|
|
||||||
|
|
||||||
# Move to source directory
|
|
||||||
pushd ${SOURCE_DIR}
|
|
||||||
|
|
||||||
# Build RPM
|
|
||||||
make -f .copr/Makefile srpm outdir=/root/rpmbuild/SRPMS
|
|
||||||
rpmbuild --rebuild -bb /root/rpmbuild/SRPMS/jellyfin-*.src.rpm
|
|
||||||
|
|
||||||
# Move the artifacts out
|
|
||||||
mkdir -p ${ARTIFACT_DIR}/rpm
|
|
||||||
mv /root/rpmbuild/RPMS/x86_64/jellyfin-*.rpm /root/rpmbuild/SRPMS/jellyfin-*.src.rpm ${ARTIFACT_DIR}/rpm/
|
|
||||||
chown -Rc $(stat -c %u:%g ${ARTIFACT_DIR}) ${ARTIFACT_DIR}
|
|
@ -1,34 +0,0 @@
|
|||||||
#!/usr/bin/env bash
|
|
||||||
|
|
||||||
args="${@}"
|
|
||||||
declare -a docker_envvars
|
|
||||||
for arg in ${args}; do
|
|
||||||
docker_envvars+=("-e ${arg}")
|
|
||||||
done
|
|
||||||
|
|
||||||
WORKDIR="$( pwd )"
|
|
||||||
|
|
||||||
package_temporary_dir="${WORKDIR}/pkg-dist-tmp"
|
|
||||||
output_dir="${WORKDIR}/pkg-dist"
|
|
||||||
current_user="$( whoami )"
|
|
||||||
image_name="jellyfin-centos-build"
|
|
||||||
|
|
||||||
# Determine if sudo should be used for Docker
|
|
||||||
if [[ ! -z $(id -Gn | grep -q 'docker') ]] \
|
|
||||||
&& [[ ! ${EUID:-1000} -eq 0 ]] \
|
|
||||||
&& [[ ! ${USER} == "root" ]] \
|
|
||||||
&& [[ ! -z $( echo "${OSTYPE}" | grep -q "darwin" ) ]]; then
|
|
||||||
docker_sudo="sudo"
|
|
||||||
else
|
|
||||||
docker_sudo=""
|
|
||||||
fi
|
|
||||||
|
|
||||||
# Prepare temporary package dir
|
|
||||||
mkdir -p "${package_temporary_dir}"
|
|
||||||
# Set up the build environment Docker image
|
|
||||||
${docker_sudo} docker build ../.. -t "${image_name}" -f ./Dockerfile
|
|
||||||
# Build the RPMs and copy out to ${package_temporary_dir}
|
|
||||||
${docker_sudo} docker run --rm -v "${package_temporary_dir}:/dist" "${image_name}" ${docker_envvars}
|
|
||||||
# Move the RPMs to the output directory
|
|
||||||
mkdir -p "${output_dir}"
|
|
||||||
mv "${package_temporary_dir}"/rpm/* "${output_dir}"
|
|
@ -1 +0,0 @@
|
|||||||
../fedora-package-x64/pkg-src/
|
|
@ -1,34 +0,0 @@
|
|||||||
FROM debian:10
|
|
||||||
# Docker build arguments
|
|
||||||
ARG SOURCE_DIR=/jellyfin
|
|
||||||
ARG PLATFORM_DIR=/jellyfin/deployment/debian-package-arm64
|
|
||||||
ARG ARTIFACT_DIR=/dist
|
|
||||||
ARG SDK_VERSION=3.1
|
|
||||||
# Docker run environment
|
|
||||||
ENV SOURCE_DIR=/jellyfin
|
|
||||||
ENV ARTIFACT_DIR=/dist
|
|
||||||
ENV DEB_BUILD_OPTIONS=noddebs
|
|
||||||
ENV ARCH=arm64
|
|
||||||
|
|
||||||
# Prepare Debian build environment
|
|
||||||
RUN apt-get update \
|
|
||||||
&& apt-get install -y apt-transport-https debhelper gnupg wget npm devscripts mmv libc6-dev libcurl4-openssl-dev libfontconfig1-dev libfreetype6-dev libssl-dev liblttng-ust0
|
|
||||||
|
|
||||||
# Install dotnet repository
|
|
||||||
# https://dotnet.microsoft.com/download/linux-package-manager/debian9/sdk-current
|
|
||||||
RUN wget https://download.visualstudio.microsoft.com/download/pr/5a4c8f96-1c73-401c-a6de-8e100403188a/0ce6ab39747e2508366d498f9c0a0669/dotnet-sdk-3.1.100-linux-arm64.tar.gz -O dotnet-sdk.tar.gz \
|
|
||||||
&& mkdir -p dotnet-sdk \
|
|
||||||
&& tar -xzf dotnet-sdk.tar.gz -C dotnet-sdk \
|
|
||||||
&& ln -s $( pwd )/dotnet-sdk/dotnet /usr/bin/dotnet
|
|
||||||
|
|
||||||
# Link to docker-build script
|
|
||||||
RUN ln -sf ${PLATFORM_DIR}/docker-build.sh /docker-build.sh
|
|
||||||
|
|
||||||
# Link to Debian source dir; mkdir needed or it fails, can't force dest
|
|
||||||
RUN mkdir -p ${SOURCE_DIR} && ln -sf ${PLATFORM_DIR}/pkg-src ${SOURCE_DIR}/debian
|
|
||||||
|
|
||||||
VOLUME ${ARTIFACT_DIR}/
|
|
||||||
|
|
||||||
COPY . ${SOURCE_DIR}/
|
|
||||||
|
|
||||||
ENTRYPOINT ["/docker-build.sh"]
|
|
@ -1,27 +0,0 @@
|
|||||||
#!/usr/bin/env bash
|
|
||||||
|
|
||||||
keep_artifacts="${1}"
|
|
||||||
|
|
||||||
WORKDIR="$( pwd )"
|
|
||||||
|
|
||||||
package_temporary_dir="${WORKDIR}/pkg-dist-tmp"
|
|
||||||
output_dir="${WORKDIR}/pkg-dist"
|
|
||||||
current_user="$( whoami )"
|
|
||||||
image_name="jellyfin-debian_arm64-build"
|
|
||||||
|
|
||||||
rm -rf "${package_temporary_dir}" &>/dev/null \
|
|
||||||
|| sudo rm -rf "${package_temporary_dir}" &>/dev/null
|
|
||||||
|
|
||||||
rm -rf "${output_dir}" &>/dev/null \
|
|
||||||
|| sudo rm -rf "${output_dir}" &>/dev/null
|
|
||||||
|
|
||||||
if [[ ${keep_artifacts} == 'n' ]]; then
|
|
||||||
docker_sudo=""
|
|
||||||
if [[ ! -z $(id -Gn | grep -q 'docker') ]] \
|
|
||||||
&& [[ ! ${EUID:-1000} -eq 0 ]] \
|
|
||||||
&& [[ ! ${USER} == "root" ]] \
|
|
||||||
&& [[ ! -z $( echo "${OSTYPE}" | grep -q "darwin" ) ]]; then
|
|
||||||
docker_sudo=sudo
|
|
||||||
fi
|
|
||||||
${docker_sudo} docker image rm ${image_name} --force
|
|
||||||
fi
|
|
@ -1 +0,0 @@
|
|||||||
docker
|
|
@ -1,21 +0,0 @@
|
|||||||
#!/bin/bash
|
|
||||||
|
|
||||||
# Builds the DEB inside the Docker container
|
|
||||||
|
|
||||||
set -o errexit
|
|
||||||
set -o xtrace
|
|
||||||
|
|
||||||
# Move to source directory
|
|
||||||
pushd ${SOURCE_DIR}
|
|
||||||
|
|
||||||
# Remove build-dep for dotnet-sdk-3.1, since it's not a package in this image
|
|
||||||
sed -i '/dotnet-sdk-3.1,/d' debian/control
|
|
||||||
|
|
||||||
# Build DEB
|
|
||||||
export CONFIG_SITE=/etc/dpkg-cross/cross-config.${ARCH}
|
|
||||||
dpkg-buildpackage -us -uc -aarm64
|
|
||||||
|
|
||||||
# Move the artifacts out
|
|
||||||
mkdir -p ${ARTIFACT_DIR}/deb
|
|
||||||
mv /jellyfin[-_]* ${ARTIFACT_DIR}/deb/
|
|
||||||
chown -Rc $(stat -c %u:%g ${ARTIFACT_DIR}) ${ARTIFACT_DIR}
|
|
@ -1,45 +0,0 @@
|
|||||||
#!/usr/bin/env bash
|
|
||||||
|
|
||||||
args="${@}"
|
|
||||||
declare -a docker_envvars
|
|
||||||
for arg in ${args}; do
|
|
||||||
docker_envvars+=("-e ${arg}")
|
|
||||||
done
|
|
||||||
|
|
||||||
ARCH="$( arch )"
|
|
||||||
WORKDIR="$( pwd )"
|
|
||||||
|
|
||||||
package_temporary_dir="${WORKDIR}/pkg-dist-tmp"
|
|
||||||
output_dir="${WORKDIR}/pkg-dist"
|
|
||||||
current_user="$( whoami )"
|
|
||||||
image_name="jellyfin-debian_arm64-build"
|
|
||||||
|
|
||||||
# Determine if sudo should be used for Docker
|
|
||||||
if [[ ! -z $(id -Gn | grep -q 'docker') ]] \
|
|
||||||
&& [[ ! ${EUID:-1000} -eq 0 ]] \
|
|
||||||
&& [[ ! ${USER} == "root" ]] \
|
|
||||||
&& [[ ! -z $( echo "${OSTYPE}" | grep -q "darwin" ) ]]; then
|
|
||||||
docker_sudo="sudo"
|
|
||||||
else
|
|
||||||
docker_sudo=""
|
|
||||||
fi
|
|
||||||
|
|
||||||
# Determine which Dockerfile to use
|
|
||||||
case $ARCH in
|
|
||||||
'x86_64')
|
|
||||||
DOCKERFILE="Dockerfile.amd64"
|
|
||||||
;;
|
|
||||||
'armv7l')
|
|
||||||
DOCKERFILE="Dockerfile.arm64"
|
|
||||||
;;
|
|
||||||
esac
|
|
||||||
|
|
||||||
# Prepare temporary package dir
|
|
||||||
mkdir -p "${package_temporary_dir}"
|
|
||||||
# Set up the build environment Docker image
|
|
||||||
${docker_sudo} docker build ../.. -t "${image_name}" -f ./${DOCKERFILE}
|
|
||||||
# Build the DEBs and copy out to ${package_temporary_dir}
|
|
||||||
${docker_sudo} docker run --rm -v "${package_temporary_dir}:/dist" "${image_name}" ${docker_envvars}
|
|
||||||
# Move the DEBs to the output directory
|
|
||||||
mkdir -p "${output_dir}"
|
|
||||||
mv "${package_temporary_dir}"/deb/* "${output_dir}"
|
|
@ -1 +0,0 @@
|
|||||||
../debian-package-x64/pkg-src
|
|
@ -1,34 +0,0 @@
|
|||||||
FROM debian:10
|
|
||||||
# Docker build arguments
|
|
||||||
ARG SOURCE_DIR=/jellyfin
|
|
||||||
ARG PLATFORM_DIR=/jellyfin/deployment/debian-package-armhf
|
|
||||||
ARG ARTIFACT_DIR=/dist
|
|
||||||
ARG SDK_VERSION=3.1
|
|
||||||
# Docker run environment
|
|
||||||
ENV SOURCE_DIR=/jellyfin
|
|
||||||
ENV ARTIFACT_DIR=/dist
|
|
||||||
ENV DEB_BUILD_OPTIONS=noddebs
|
|
||||||
ENV ARCH=armhf
|
|
||||||
|
|
||||||
# Prepare Debian build environment
|
|
||||||
RUN apt-get update \
|
|
||||||
&& apt-get install -y apt-transport-https debhelper gnupg wget npm devscripts mmv libc6-dev libcurl4-openssl-dev libfontconfig1-dev libfreetype6-dev libssl-dev liblttng-ust0
|
|
||||||
|
|
||||||
# Install dotnet repository
|
|
||||||
# https://dotnet.microsoft.com/download/linux-package-manager/debian9/sdk-current
|
|
||||||
RUN wget https://download.visualstudio.microsoft.com/download/pr/67766a96-eb8c-4cd2-bca4-ea63d2cc115c/7bf13840aa2ed88793b7315d5e0d74e6/dotnet-sdk-3.1.100-linux-arm.tar.gz -O dotnet-sdk.tar.gz \
|
|
||||||
&& mkdir -p dotnet-sdk \
|
|
||||||
&& tar -xzf dotnet-sdk.tar.gz -C dotnet-sdk \
|
|
||||||
&& ln -s $( pwd )/dotnet-sdk/dotnet /usr/bin/dotnet
|
|
||||||
|
|
||||||
# Link to docker-build script
|
|
||||||
RUN ln -sf ${PLATFORM_DIR}/docker-build.sh /docker-build.sh
|
|
||||||
|
|
||||||
# Link to Debian source dir; mkdir needed or it fails, can't force dest
|
|
||||||
RUN mkdir -p ${SOURCE_DIR} && ln -sf ${PLATFORM_DIR}/pkg-src ${SOURCE_DIR}/debian
|
|
||||||
|
|
||||||
VOLUME ${ARTIFACT_DIR}/
|
|
||||||
|
|
||||||
COPY . ${SOURCE_DIR}/
|
|
||||||
|
|
||||||
ENTRYPOINT ["/docker-build.sh"]
|
|
@ -1,27 +0,0 @@
|
|||||||
#!/usr/bin/env bash
|
|
||||||
|
|
||||||
keep_artifacts="${1}"
|
|
||||||
|
|
||||||
WORKDIR="$( pwd )"
|
|
||||||
|
|
||||||
package_temporary_dir="${WORKDIR}/pkg-dist-tmp"
|
|
||||||
output_dir="${WORKDIR}/pkg-dist"
|
|
||||||
current_user="$( whoami )"
|
|
||||||
image_name="jellyfin-debian_armhf-build"
|
|
||||||
|
|
||||||
rm -rf "${package_temporary_dir}" &>/dev/null \
|
|
||||||
|| sudo rm -rf "${package_temporary_dir}" &>/dev/null
|
|
||||||
|
|
||||||
rm -rf "${output_dir}" &>/dev/null \
|
|
||||||
|| sudo rm -rf "${output_dir}" &>/dev/null
|
|
||||||
|
|
||||||
if [[ ${keep_artifacts} == 'n' ]]; then
|
|
||||||
docker_sudo=""
|
|
||||||
if [[ ! -z $(id -Gn | grep -q 'docker') ]] \
|
|
||||||
&& [[ ! ${EUID:-1000} -eq 0 ]] \
|
|
||||||
&& [[ ! ${USER} == "root" ]] \
|
|
||||||
&& [[ ! -z $( echo "${OSTYPE}" | grep -q "darwin" ) ]]; then
|
|
||||||
docker_sudo=sudo
|
|
||||||
fi
|
|
||||||
${docker_sudo} docker image rm ${image_name} --force
|
|
||||||
fi
|
|
@ -1 +0,0 @@
|
|||||||
docker
|
|
@ -1,21 +0,0 @@
|
|||||||
#!/bin/bash
|
|
||||||
|
|
||||||
# Builds the DEB inside the Docker container
|
|
||||||
|
|
||||||
set -o errexit
|
|
||||||
set -o xtrace
|
|
||||||
|
|
||||||
# Move to source directory
|
|
||||||
pushd ${SOURCE_DIR}
|
|
||||||
|
|
||||||
# Remove build-dep for dotnet-sdk-3.1, since it's not a package in this image
|
|
||||||
sed -i '/dotnet-sdk-3.1,/d' debian/control
|
|
||||||
|
|
||||||
# Build DEB
|
|
||||||
export CONFIG_SITE=/etc/dpkg-cross/cross-config.${ARCH}
|
|
||||||
dpkg-buildpackage -us -uc -aarmhf
|
|
||||||
|
|
||||||
# Move the artifacts out
|
|
||||||
mkdir -p ${ARTIFACT_DIR}/deb
|
|
||||||
mv /jellyfin[-_]* ${ARTIFACT_DIR}/deb/
|
|
||||||
chown -Rc $(stat -c %u:%g ${ARTIFACT_DIR}) ${ARTIFACT_DIR}
|
|
@ -1,45 +0,0 @@
|
|||||||
#!/usr/bin/env bash
|
|
||||||
|
|
||||||
args="${@}"
|
|
||||||
declare -a docker_envvars
|
|
||||||
for arg in ${args}; do
|
|
||||||
docker_envvars+=("-e ${arg}")
|
|
||||||
done
|
|
||||||
|
|
||||||
ARCH="$( arch )"
|
|
||||||
WORKDIR="$( pwd )"
|
|
||||||
|
|
||||||
package_temporary_dir="${WORKDIR}/pkg-dist-tmp"
|
|
||||||
output_dir="${WORKDIR}/pkg-dist"
|
|
||||||
current_user="$( whoami )"
|
|
||||||
image_name="jellyfin-debian_armhf-build"
|
|
||||||
|
|
||||||
# Determine if sudo should be used for Docker
|
|
||||||
if [[ ! -z $(id -Gn | grep -q 'docker') ]] \
|
|
||||||
&& [[ ! ${EUID:-1000} -eq 0 ]] \
|
|
||||||
&& [[ ! ${USER} == "root" ]] \
|
|
||||||
&& [[ ! -z $( echo "${OSTYPE}" | grep -q "darwin" ) ]]; then
|
|
||||||
docker_sudo="sudo"
|
|
||||||
else
|
|
||||||
docker_sudo=""
|
|
||||||
fi
|
|
||||||
|
|
||||||
# Determine which Dockerfile to use
|
|
||||||
case $ARCH in
|
|
||||||
'x86_64')
|
|
||||||
DOCKERFILE="Dockerfile.amd64"
|
|
||||||
;;
|
|
||||||
'armv7l')
|
|
||||||
DOCKERFILE="Dockerfile.armhf"
|
|
||||||
;;
|
|
||||||
esac
|
|
||||||
|
|
||||||
# Prepare temporary package dir
|
|
||||||
mkdir -p "${package_temporary_dir}"
|
|
||||||
# Set up the build environment Docker image
|
|
||||||
${docker_sudo} docker build ../.. -t "${image_name}" -f ./${DOCKERFILE}
|
|
||||||
# Build the DEBs and copy out to ${package_temporary_dir}
|
|
||||||
${docker_sudo} docker run --rm -v "${package_temporary_dir}:/dist" "${image_name}" ${docker_envvars}
|
|
||||||
# Move the DEBs to the output directory
|
|
||||||
mkdir -p "${output_dir}"
|
|
||||||
mv "${package_temporary_dir}"/deb/* "${output_dir}"
|
|
@ -1 +0,0 @@
|
|||||||
../debian-package-x64/pkg-src/
|
|
@ -1,34 +0,0 @@
|
|||||||
FROM debian:10
|
|
||||||
# Docker build arguments
|
|
||||||
ARG SOURCE_DIR=/jellyfin
|
|
||||||
ARG PLATFORM_DIR=/jellyfin/deployment/debian-package-x64
|
|
||||||
ARG ARTIFACT_DIR=/dist
|
|
||||||
ARG SDK_VERSION=3.1
|
|
||||||
# Docker run environment
|
|
||||||
ENV SOURCE_DIR=/jellyfin
|
|
||||||
ENV ARTIFACT_DIR=/dist
|
|
||||||
ENV DEB_BUILD_OPTIONS=noddebs
|
|
||||||
ENV ARCH=amd64
|
|
||||||
|
|
||||||
# Prepare Debian build environment
|
|
||||||
RUN apt-get update \
|
|
||||||
&& apt-get install -y apt-transport-https debhelper gnupg wget npm devscripts mmv libc6-dev libcurl4-openssl-dev libfontconfig1-dev libfreetype6-dev libssl-dev libssl1.1 liblttng-ust0
|
|
||||||
|
|
||||||
# Install dotnet repository
|
|
||||||
# https://dotnet.microsoft.com/download/linux-package-manager/debian9/sdk-current
|
|
||||||
RUN wget https://download.visualstudio.microsoft.com/download/pr/d731f991-8e68-4c7c-8ea0-fad5605b077a/49497b5420eecbd905158d86d738af64/dotnet-sdk-3.1.100-linux-x64.tar.gz -O dotnet-sdk.tar.gz \
|
|
||||||
&& mkdir -p dotnet-sdk \
|
|
||||||
&& tar -xzf dotnet-sdk.tar.gz -C dotnet-sdk \
|
|
||||||
&& ln -s $( pwd )/dotnet-sdk/dotnet /usr/bin/dotnet
|
|
||||||
|
|
||||||
# Link to docker-build script
|
|
||||||
RUN ln -sf ${PLATFORM_DIR}/docker-build.sh /docker-build.sh
|
|
||||||
|
|
||||||
# Link to Debian source dir; mkdir needed or it fails, can't force dest
|
|
||||||
RUN mkdir -p ${SOURCE_DIR} && ln -sf ${PLATFORM_DIR}/pkg-src ${SOURCE_DIR}/debian
|
|
||||||
|
|
||||||
VOLUME ${ARTIFACT_DIR}/
|
|
||||||
|
|
||||||
COPY . ${SOURCE_DIR}/
|
|
||||||
|
|
||||||
ENTRYPOINT ["/docker-build.sh"]
|
|
@ -1,27 +0,0 @@
|
|||||||
#!/usr/bin/env bash
|
|
||||||
|
|
||||||
keep_artifacts="${1}"
|
|
||||||
|
|
||||||
WORKDIR="$( pwd )"
|
|
||||||
|
|
||||||
package_temporary_dir="${WORKDIR}/pkg-dist-tmp"
|
|
||||||
output_dir="${WORKDIR}/pkg-dist"
|
|
||||||
current_user="$( whoami )"
|
|
||||||
image_name="jellyfin-debian-build"
|
|
||||||
|
|
||||||
rm -rf "${package_temporary_dir}" &>/dev/null \
|
|
||||||
|| sudo rm -rf "${package_temporary_dir}" &>/dev/null
|
|
||||||
|
|
||||||
rm -rf "${output_dir}" &>/dev/null \
|
|
||||||
|| sudo rm -rf "${output_dir}" &>/dev/null
|
|
||||||
|
|
||||||
if [[ ${keep_artifacts} == 'n' ]]; then
|
|
||||||
docker_sudo=""
|
|
||||||
if [[ ! -z $(id -Gn | grep -q 'docker') ]] \
|
|
||||||
&& [[ ! ${EUID:-1000} -eq 0 ]] \
|
|
||||||
&& [[ ! ${USER} == "root" ]] \
|
|
||||||
&& [[ ! -z $( echo "${OSTYPE}" | grep -q "darwin" ) ]]; then
|
|
||||||
docker_sudo=sudo
|
|
||||||
fi
|
|
||||||
${docker_sudo} docker image rm ${image_name} --force
|
|
||||||
fi
|
|
@ -1 +0,0 @@
|
|||||||
docker
|
|
@ -1,20 +0,0 @@
|
|||||||
#!/bin/bash
|
|
||||||
|
|
||||||
# Builds the DEB inside the Docker container
|
|
||||||
|
|
||||||
set -o errexit
|
|
||||||
set -o xtrace
|
|
||||||
|
|
||||||
# Move to source directory
|
|
||||||
pushd ${SOURCE_DIR}
|
|
||||||
|
|
||||||
# Remove build-dep for dotnet-sdk-3.1, since it's not a package in this image
|
|
||||||
sed -i '/dotnet-sdk-3.1,/d' debian/control
|
|
||||||
|
|
||||||
# Build DEB
|
|
||||||
dpkg-buildpackage -us -uc
|
|
||||||
|
|
||||||
# Move the artifacts out
|
|
||||||
mkdir -p ${ARTIFACT_DIR}/deb
|
|
||||||
mv /jellyfin[-_]* ${ARTIFACT_DIR}/deb/
|
|
||||||
chown -Rc $(stat -c %u:%g ${ARTIFACT_DIR}) ${ARTIFACT_DIR}
|
|
@ -1,34 +0,0 @@
|
|||||||
#!/usr/bin/env bash
|
|
||||||
|
|
||||||
args="${@}"
|
|
||||||
declare -a docker_envvars
|
|
||||||
for arg in ${args}; do
|
|
||||||
docker_envvars+=("-e ${arg}")
|
|
||||||
done
|
|
||||||
|
|
||||||
WORKDIR="$( pwd )"
|
|
||||||
|
|
||||||
package_temporary_dir="${WORKDIR}/pkg-dist-tmp"
|
|
||||||
output_dir="${WORKDIR}/pkg-dist"
|
|
||||||
current_user="$( whoami )"
|
|
||||||
image_name="jellyfin-debian-build"
|
|
||||||
|
|
||||||
# Determine if sudo should be used for Docker
|
|
||||||
if [[ ! -z $(id -Gn | grep -q 'docker') ]] \
|
|
||||||
&& [[ ! ${EUID:-1000} -eq 0 ]] \
|
|
||||||
&& [[ ! ${USER} == "root" ]] \
|
|
||||||
&& [[ ! -z $( echo "${OSTYPE}" | grep -q "darwin" ) ]]; then
|
|
||||||
docker_sudo="sudo"
|
|
||||||
else
|
|
||||||
docker_sudo=""
|
|
||||||
fi
|
|
||||||
|
|
||||||
# Prepare temporary package dir
|
|
||||||
mkdir -p "${package_temporary_dir}"
|
|
||||||
# Set up the build environment Docker image
|
|
||||||
${docker_sudo} docker build ../.. -t "${image_name}" -f ./Dockerfile
|
|
||||||
# Build the DEBs and copy out to ${package_temporary_dir}
|
|
||||||
${docker_sudo} docker run --rm -v "${package_temporary_dir}:/dist" "${image_name}" ${docker_envvars}
|
|
||||||
# Move the DEBs to the output directory
|
|
||||||
mkdir -p "${output_dir}"
|
|
||||||
mv "${package_temporary_dir}"/deb/* "${output_dir}"
|
|
@ -1,32 +0,0 @@
|
|||||||
#!/usr/bin/env bash
|
|
||||||
|
|
||||||
keep_artifacts="${1}"
|
|
||||||
|
|
||||||
WORKDIR="$( pwd )"
|
|
||||||
VERSION="$( grep -A1 '^Version:' ${WORKDIR}/pkg-src/jellyfin.spec | awk '{ print $NF }' )"
|
|
||||||
|
|
||||||
package_temporary_dir="${WORKDIR}/pkg-dist-tmp"
|
|
||||||
package_source_dir="${WORKDIR}/pkg-src"
|
|
||||||
output_dir="${WORKDIR}/pkg-dist"
|
|
||||||
current_user="$( whoami )"
|
|
||||||
image_name="jellyfin-fedora-build"
|
|
||||||
|
|
||||||
rm -f "${package_source_dir}/jellyfin-${VERSION}.tar.gz" &>/dev/null \
|
|
||||||
|| sudo rm -f "${package_source_dir}/jellyfin-${VERSION}.tar.gz" &>/dev/null
|
|
||||||
|
|
||||||
rm -rf "${package_temporary_dir}" &>/dev/null \
|
|
||||||
|| sudo rm -rf "${package_temporary_dir}" &>/dev/null
|
|
||||||
|
|
||||||
rm -rf "${output_dir}" &>/dev/null \
|
|
||||||
|| sudo rm -rf "${output_dir}" &>/dev/null
|
|
||||||
|
|
||||||
if [[ ${keep_artifacts} == 'n' ]]; then
|
|
||||||
docker_sudo=""
|
|
||||||
if [[ ! -z $(id -Gn | grep -q 'docker') ]] \
|
|
||||||
&& [[ ! ${EUID:-1000} -eq 0 ]] \
|
|
||||||
&& [[ ! ${USER} == "root" ]] \
|
|
||||||
&& [[ ! -z $( echo "${OSTYPE}" | grep -q "darwin" ) ]]; then
|
|
||||||
docker_sudo=sudo
|
|
||||||
fi
|
|
||||||
${docker_sudo} docker image rm ${image_name} --force
|
|
||||||
fi
|
|
@ -1 +0,0 @@
|
|||||||
docker
|
|
@ -1,18 +0,0 @@
|
|||||||
#!/bin/bash
|
|
||||||
|
|
||||||
# Builds the RPM inside the Docker container
|
|
||||||
|
|
||||||
set -o errexit
|
|
||||||
set -o xtrace
|
|
||||||
|
|
||||||
# Move to source directory
|
|
||||||
pushd ${SOURCE_DIR}
|
|
||||||
|
|
||||||
# Build RPM
|
|
||||||
make -f .copr/Makefile srpm outdir=/root/rpmbuild/SRPMS
|
|
||||||
rpmbuild -rb /root/rpmbuild/SRPMS/jellyfin-*.src.rpm
|
|
||||||
|
|
||||||
# Move the artifacts out
|
|
||||||
mkdir -p ${ARTIFACT_DIR}/rpm
|
|
||||||
mv /root/rpmbuild/RPMS/x86_64/jellyfin-*.rpm /root/rpmbuild/SRPMS/jellyfin-*.src.rpm ${ARTIFACT_DIR}/rpm/
|
|
||||||
chown -Rc $(stat -c %u:%g ${ARTIFACT_DIR}) ${ARTIFACT_DIR}
|
|
@ -1,34 +0,0 @@
|
|||||||
#!/usr/bin/env bash
|
|
||||||
|
|
||||||
args="${@}"
|
|
||||||
declare -a docker_envvars
|
|
||||||
for arg in ${args}; do
|
|
||||||
docker_envvars+=("-e ${arg}")
|
|
||||||
done
|
|
||||||
|
|
||||||
WORKDIR="$( pwd )"
|
|
||||||
|
|
||||||
package_temporary_dir="${WORKDIR}/pkg-dist-tmp"
|
|
||||||
output_dir="${WORKDIR}/pkg-dist"
|
|
||||||
current_user="$( whoami )"
|
|
||||||
image_name="jellyfin-fedora-build"
|
|
||||||
|
|
||||||
# Determine if sudo should be used for Docker
|
|
||||||
if [[ ! -z $(id -Gn | grep -q 'docker') ]] \
|
|
||||||
&& [[ ! ${EUID:-1000} -eq 0 ]] \
|
|
||||||
&& [[ ! ${USER} == "root" ]] \
|
|
||||||
&& [[ ! -z $( echo "${OSTYPE}" | grep -q "darwin" ) ]]; then
|
|
||||||
docker_sudo="sudo"
|
|
||||||
else
|
|
||||||
docker_sudo=""
|
|
||||||
fi
|
|
||||||
|
|
||||||
# Prepare temporary package dir
|
|
||||||
mkdir -p "${package_temporary_dir}"
|
|
||||||
# Set up the build environment Docker image
|
|
||||||
${docker_sudo} docker build ../.. -t "${image_name}" -f ./Dockerfile
|
|
||||||
# Build the RPMs and copy out to ${package_temporary_dir}
|
|
||||||
${docker_sudo} docker run --rm -v "${package_temporary_dir}:/dist" "${image_name}" ${docker_envvars}
|
|
||||||
# Move the RPMs to the output directory
|
|
||||||
mkdir -p "${output_dir}"
|
|
||||||
mv "${package_temporary_dir}"/rpm/* "${output_dir}"
|
|
@ -1,27 +0,0 @@
|
|||||||
#!/usr/bin/env bash
|
|
||||||
|
|
||||||
keep_artifacts="${1}"
|
|
||||||
|
|
||||||
WORKDIR="$( pwd )"
|
|
||||||
|
|
||||||
package_temporary_dir="${WORKDIR}/pkg-dist-tmp"
|
|
||||||
output_dir="${WORKDIR}/pkg-dist"
|
|
||||||
current_user="$( whoami )"
|
|
||||||
image_name="jellyfin-linux-build"
|
|
||||||
|
|
||||||
rm -rf "${package_temporary_dir}" &>/dev/null \
|
|
||||||
|| sudo rm -rf "${package_temporary_dir}" &>/dev/null
|
|
||||||
|
|
||||||
rm -rf "${output_dir}" &>/dev/null \
|
|
||||||
|| sudo rm -rf "${output_dir}" &>/dev/null
|
|
||||||
|
|
||||||
if [[ ${keep_artifacts} == 'n' ]]; then
|
|
||||||
docker_sudo=""
|
|
||||||
if [[ ! -z $(id -Gn | grep -q 'docker') ]] \
|
|
||||||
&& [[ ! ${EUID:-1000} -eq 0 ]] \
|
|
||||||
&& [[ ! ${USER} == "root" ]] \
|
|
||||||
&& [[ ! -z $( echo "${OSTYPE}" | grep -q "darwin" ) ]]; then
|
|
||||||
docker_sudo=sudo
|
|
||||||
fi
|
|
||||||
${docker_sudo} docker image rm ${image_name} --force
|
|
||||||
fi
|
|
@ -1 +0,0 @@
|
|||||||
docker
|
|
@ -1,36 +0,0 @@
|
|||||||
#!/bin/bash
|
|
||||||
|
|
||||||
# Builds the TAR archive inside the Docker container
|
|
||||||
|
|
||||||
set -o errexit
|
|
||||||
set -o xtrace
|
|
||||||
|
|
||||||
# Move to source directory
|
|
||||||
pushd ${SOURCE_DIR}
|
|
||||||
|
|
||||||
# Clone down and build Web frontend
|
|
||||||
web_build_dir="$( mktemp -d )"
|
|
||||||
web_target="${SOURCE_DIR}/MediaBrowser.WebDashboard/jellyfin-web"
|
|
||||||
git clone https://github.com/jellyfin/jellyfin-web.git ${web_build_dir}/
|
|
||||||
pushd ${web_build_dir}
|
|
||||||
if [[ -n ${web_branch} ]]; then
|
|
||||||
checkout -b origin/${web_branch}
|
|
||||||
fi
|
|
||||||
yarn install
|
|
||||||
mkdir -p ${web_target}
|
|
||||||
mv dist/* ${web_target}/
|
|
||||||
popd
|
|
||||||
rm -rf ${web_build_dir}
|
|
||||||
|
|
||||||
# Get version
|
|
||||||
version="$( grep "version:" ./build.yaml | sed -E 's/version: "([0-9\.]+.*)"/\1/' )"
|
|
||||||
|
|
||||||
# Build archives
|
|
||||||
dotnet publish Jellyfin.Server --configuration Release --self-contained --runtime linux-x64 --output /dist/jellyfin_${version}/ "-p:GenerateDocumentationFile=false;DebugSymbols=false;DebugType=none;UseAppHost=true"
|
|
||||||
tar -cvzf /jellyfin_${version}.portable.tar.gz -C /dist jellyfin_${version}
|
|
||||||
rm -rf /dist/jellyfin_${version}
|
|
||||||
|
|
||||||
# Move the artifacts out
|
|
||||||
mkdir -p ${ARTIFACT_DIR}/
|
|
||||||
mv /jellyfin[-_]*.tar.gz ${ARTIFACT_DIR}/
|
|
||||||
chown -Rc $(stat -c %u:%g ${ARTIFACT_DIR}) ${ARTIFACT_DIR}
|
|
@ -1,34 +0,0 @@
|
|||||||
#!/usr/bin/env bash
|
|
||||||
|
|
||||||
args="${@}"
|
|
||||||
declare -a docker_envvars
|
|
||||||
for arg in ${args}; do
|
|
||||||
docker_envvars+=("-e ${arg}")
|
|
||||||
done
|
|
||||||
|
|
||||||
WORKDIR="$( pwd )"
|
|
||||||
|
|
||||||
package_temporary_dir="${WORKDIR}/pkg-dist-tmp"
|
|
||||||
output_dir="${WORKDIR}/pkg-dist"
|
|
||||||
current_user="$( whoami )"
|
|
||||||
image_name="jellyfin-linux-build"
|
|
||||||
|
|
||||||
# Determine if sudo should be used for Docker
|
|
||||||
if [[ ! -z $(id -Gn | grep -q 'docker') ]] \
|
|
||||||
&& [[ ! ${EUID:-1000} -eq 0 ]] \
|
|
||||||
&& [[ ! ${USER} == "root" ]] \
|
|
||||||
&& [[ ! -z $( echo "${OSTYPE}" | grep -q "darwin" ) ]]; then
|
|
||||||
docker_sudo="sudo"
|
|
||||||
else
|
|
||||||
docker_sudo=""
|
|
||||||
fi
|
|
||||||
|
|
||||||
# Prepare temporary package dir
|
|
||||||
mkdir -p "${package_temporary_dir}"
|
|
||||||
# Set up the build environment Docker image
|
|
||||||
${docker_sudo} docker build ../.. -t "${image_name}" -f ./Dockerfile
|
|
||||||
# Build the DEBs and copy out to ${package_temporary_dir}
|
|
||||||
${docker_sudo} docker run --rm -v "${package_temporary_dir}:/dist" "${image_name}" ${docker_envvars}
|
|
||||||
# Move the DEBs to the output directory
|
|
||||||
mkdir -p "${output_dir}"
|
|
||||||
mv "${package_temporary_dir}"/* "${output_dir}"
|
|
@ -1,27 +0,0 @@
|
|||||||
#!/usr/bin/env bash
|
|
||||||
|
|
||||||
keep_artifacts="${1}"
|
|
||||||
|
|
||||||
WORKDIR="$( pwd )"
|
|
||||||
|
|
||||||
package_temporary_dir="${WORKDIR}/pkg-dist-tmp"
|
|
||||||
output_dir="${WORKDIR}/pkg-dist"
|
|
||||||
current_user="$( whoami )"
|
|
||||||
image_name="jellyfin-linux-build"
|
|
||||||
|
|
||||||
rm -rf "${package_temporary_dir}" &>/dev/null \
|
|
||||||
|| sudo rm -rf "${package_temporary_dir}" &>/dev/null
|
|
||||||
|
|
||||||
rm -rf "${output_dir}" &>/dev/null \
|
|
||||||
|| sudo rm -rf "${output_dir}" &>/dev/null
|
|
||||||
|
|
||||||
if [[ ${keep_artifacts} == 'n' ]]; then
|
|
||||||
docker_sudo=""
|
|
||||||
if [[ ! -z $(id -Gn | grep -q 'docker') ]] \
|
|
||||||
&& [[ ! ${EUID:-1000} -eq 0 ]] \
|
|
||||||
&& [[ ! ${USER} == "root" ]] \
|
|
||||||
&& [[ ! -z $( echo "${OSTYPE}" | grep -q "darwin" ) ]]; then
|
|
||||||
docker_sudo=sudo
|
|
||||||
fi
|
|
||||||
${docker_sudo} docker image rm ${image_name} --force
|
|
||||||
fi
|
|
@ -1 +0,0 @@
|
|||||||
docker
|
|
@ -1,36 +0,0 @@
|
|||||||
#!/bin/bash
|
|
||||||
|
|
||||||
# Builds the TAR archive inside the Docker container
|
|
||||||
|
|
||||||
set -o errexit
|
|
||||||
set -o xtrace
|
|
||||||
|
|
||||||
# Move to source directory
|
|
||||||
pushd ${SOURCE_DIR}
|
|
||||||
|
|
||||||
# Clone down and build Web frontend
|
|
||||||
web_build_dir="$( mktemp -d )"
|
|
||||||
web_target="${SOURCE_DIR}/MediaBrowser.WebDashboard/jellyfin-web"
|
|
||||||
git clone https://github.com/jellyfin/jellyfin-web.git ${web_build_dir}/
|
|
||||||
pushd ${web_build_dir}
|
|
||||||
if [[ -n ${web_branch} ]]; then
|
|
||||||
checkout -b origin/${web_branch}
|
|
||||||
fi
|
|
||||||
yarn install
|
|
||||||
mkdir -p ${web_target}
|
|
||||||
mv dist/* ${web_target}/
|
|
||||||
popd
|
|
||||||
rm -rf ${web_build_dir}
|
|
||||||
|
|
||||||
# Get version
|
|
||||||
version="$( grep "version:" ./build.yaml | sed -E 's/version: "([0-9\.]+.*)"/\1/' )"
|
|
||||||
|
|
||||||
# Build archives
|
|
||||||
dotnet publish Jellyfin.Server --configuration Release --self-contained --runtime osx-x64 --output /dist/jellyfin_${version}/ "-p:GenerateDocumentationFile=false;DebugSymbols=false;DebugType=none;UseAppHost=true"
|
|
||||||
tar -cvzf /jellyfin_${version}.portable.tar.gz -C /dist jellyfin_${version}
|
|
||||||
rm -rf /dist/jellyfin_${version}
|
|
||||||
|
|
||||||
# Move the artifacts out
|
|
||||||
mkdir -p ${ARTIFACT_DIR}/
|
|
||||||
mv /jellyfin[-_]*.tar.gz ${ARTIFACT_DIR}/
|
|
||||||
chown -Rc $(stat -c %u:%g ${ARTIFACT_DIR}) ${ARTIFACT_DIR}
|
|
@ -1,34 +0,0 @@
|
|||||||
#!/usr/bin/env bash
|
|
||||||
|
|
||||||
args="${@}"
|
|
||||||
declare -a docker_envvars
|
|
||||||
for arg in ${args}; do
|
|
||||||
docker_envvars+=("-e ${arg}")
|
|
||||||
done
|
|
||||||
|
|
||||||
WORKDIR="$( pwd )"
|
|
||||||
|
|
||||||
package_temporary_dir="${WORKDIR}/pkg-dist-tmp"
|
|
||||||
output_dir="${WORKDIR}/pkg-dist"
|
|
||||||
current_user="$( whoami )"
|
|
||||||
image_name="jellyfin-macos-build"
|
|
||||||
|
|
||||||
# Determine if sudo should be used for Docker
|
|
||||||
if [[ ! -z $(id -Gn | grep -q 'docker') ]] \
|
|
||||||
&& [[ ! ${EUID:-1000} -eq 0 ]] \
|
|
||||||
&& [[ ! ${USER} == "root" ]] \
|
|
||||||
&& [[ ! -z $( echo "${OSTYPE}" | grep -q "darwin" ) ]]; then
|
|
||||||
docker_sudo="sudo"
|
|
||||||
else
|
|
||||||
docker_sudo=""
|
|
||||||
fi
|
|
||||||
|
|
||||||
# Prepare temporary package dir
|
|
||||||
mkdir -p "${package_temporary_dir}"
|
|
||||||
# Set up the build environment Docker image
|
|
||||||
${docker_sudo} docker build ../.. -t "${image_name}" -f ./Dockerfile
|
|
||||||
# Build the DEBs and copy out to ${package_temporary_dir}
|
|
||||||
${docker_sudo} docker run --rm -v "${package_temporary_dir}:/dist" "${image_name}" ${docker_envvars}
|
|
||||||
# Move the DEBs to the output directory
|
|
||||||
mkdir -p "${output_dir}"
|
|
||||||
mv "${package_temporary_dir}"/* "${output_dir}"
|
|
@ -1,27 +0,0 @@
|
|||||||
#!/usr/bin/env bash
|
|
||||||
|
|
||||||
keep_artifacts="${1}"
|
|
||||||
|
|
||||||
WORKDIR="$( pwd )"
|
|
||||||
|
|
||||||
package_temporary_dir="${WORKDIR}/pkg-dist-tmp"
|
|
||||||
output_dir="${WORKDIR}/pkg-dist"
|
|
||||||
current_user="$( whoami )"
|
|
||||||
image_name="jellyfin-linux-build"
|
|
||||||
|
|
||||||
rm -rf "${package_temporary_dir}" &>/dev/null \
|
|
||||||
|| sudo rm -rf "${package_temporary_dir}" &>/dev/null
|
|
||||||
|
|
||||||
rm -rf "${output_dir}" &>/dev/null \
|
|
||||||
|| sudo rm -rf "${output_dir}" &>/dev/null
|
|
||||||
|
|
||||||
if [[ ${keep_artifacts} == 'n' ]]; then
|
|
||||||
docker_sudo=""
|
|
||||||
if [[ ! -z $(id -Gn | grep -q 'docker') ]] \
|
|
||||||
&& [[ ! ${EUID:-1000} -eq 0 ]] \
|
|
||||||
&& [[ ! ${USER} == "root" ]] \
|
|
||||||
&& [[ ! -z $( echo "${OSTYPE}" | grep -q "darwin" ) ]]; then
|
|
||||||
docker_sudo=sudo
|
|
||||||
fi
|
|
||||||
${docker_sudo} docker image rm ${image_name} --force
|
|
||||||
fi
|
|
@ -1 +0,0 @@
|
|||||||
docker
|
|
@ -1,36 +0,0 @@
|
|||||||
#!/bin/bash
|
|
||||||
|
|
||||||
# Builds the TAR archive inside the Docker container
|
|
||||||
|
|
||||||
set -o errexit
|
|
||||||
set -o xtrace
|
|
||||||
|
|
||||||
# Move to source directory
|
|
||||||
pushd ${SOURCE_DIR}
|
|
||||||
|
|
||||||
# Clone down and build Web frontend
|
|
||||||
web_build_dir="$( mktemp -d )"
|
|
||||||
web_target="${SOURCE_DIR}/MediaBrowser.WebDashboard/jellyfin-web"
|
|
||||||
git clone https://github.com/jellyfin/jellyfin-web.git ${web_build_dir}/
|
|
||||||
pushd ${web_build_dir}
|
|
||||||
if [[ -n ${web_branch} ]]; then
|
|
||||||
checkout -b origin/${web_branch}
|
|
||||||
fi
|
|
||||||
yarn install
|
|
||||||
mkdir -p ${web_target}
|
|
||||||
mv dist/* ${web_target}/
|
|
||||||
popd
|
|
||||||
rm -rf ${web_build_dir}
|
|
||||||
|
|
||||||
# Get version
|
|
||||||
version="$( grep "version:" ./build.yaml | sed -E 's/version: "([0-9\.]+.*)"/\1/' )"
|
|
||||||
|
|
||||||
# Build archives
|
|
||||||
dotnet publish Jellyfin.Server --configuration Release --output /dist/jellyfin_${version}/ "-p:GenerateDocumentationFile=false;DebugSymbols=false;DebugType=none"
|
|
||||||
tar -cvzf /jellyfin_${version}.portable.tar.gz -C /dist jellyfin_${version}
|
|
||||||
rm -rf /dist/jellyfin_${version}
|
|
||||||
|
|
||||||
# Move the artifacts out
|
|
||||||
mkdir -p ${ARTIFACT_DIR}/
|
|
||||||
mv /jellyfin[-_]*.tar.gz ${ARTIFACT_DIR}/
|
|
||||||
chown -Rc $(stat -c %u:%g ${ARTIFACT_DIR}) ${ARTIFACT_DIR}
|
|
@ -1,34 +0,0 @@
|
|||||||
#!/usr/bin/env bash
|
|
||||||
|
|
||||||
args="${@}"
|
|
||||||
declare -a docker_envvars
|
|
||||||
for arg in ${args}; do
|
|
||||||
docker_envvars+=("-e ${arg}")
|
|
||||||
done
|
|
||||||
|
|
||||||
WORKDIR="$( pwd )"
|
|
||||||
|
|
||||||
package_temporary_dir="${WORKDIR}/pkg-dist-tmp"
|
|
||||||
output_dir="${WORKDIR}/pkg-dist"
|
|
||||||
current_user="$( whoami )"
|
|
||||||
image_name="jellyfin-portable-build"
|
|
||||||
|
|
||||||
# Determine if sudo should be used for Docker
|
|
||||||
if [[ ! -z $(id -Gn | grep -q 'docker') ]] \
|
|
||||||
&& [[ ! ${EUID:-1000} -eq 0 ]] \
|
|
||||||
&& [[ ! ${USER} == "root" ]] \
|
|
||||||
&& [[ ! -z $( echo "${OSTYPE}" | grep -q "darwin" ) ]]; then
|
|
||||||
docker_sudo="sudo"
|
|
||||||
else
|
|
||||||
docker_sudo=""
|
|
||||||
fi
|
|
||||||
|
|
||||||
# Prepare temporary package dir
|
|
||||||
mkdir -p "${package_temporary_dir}"
|
|
||||||
# Set up the build environment Docker image
|
|
||||||
${docker_sudo} docker build ../.. -t "${image_name}" -f ./Dockerfile
|
|
||||||
# Build the DEBs and copy out to ${package_temporary_dir}
|
|
||||||
${docker_sudo} docker run --rm -v "${package_temporary_dir}:/dist" "${image_name}" ${docker_envvars}
|
|
||||||
# Move the DEBs to the output directory
|
|
||||||
mkdir -p "${output_dir}"
|
|
||||||
mv "${package_temporary_dir}"/* "${output_dir}"
|
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in new issue