diff --git a/build b/build index cfd09a87d..a2fec9f7c 100755 --- a/build +++ b/build @@ -6,9 +6,10 @@ usage() { echo -e "Releases: Arches:" echo -e " * stretch * amd64" echo -e " * buster * armhf" - echo -e " * xenial" + echo -e " * xenial * arm64" echo -e " * bionic" echo -e " * cosmic" + echo -e " * disco" } if [[ -z ${1} ]]; then @@ -38,6 +39,10 @@ case ${cli_release} in release="ubuntu:cosmic" gcc_version="7" ;; + 'disco') + release="ubuntu:disco" + gcc_version="7" + ;; *) echo "Invalid release." usage @@ -53,6 +58,9 @@ case ${cli_arch} in 'armhf') arch="armhf" ;; + 'arm64') + arch="arm64" + ;; *) echo "Invalid architecture." usage diff --git a/build.yaml b/build.yaml index ce31039f6..a707ef226 100644 --- a/build.yaml +++ b/build.yaml @@ -1,14 +1,21 @@ --- # We just wrap `build` so this is really it name: "jellyfin-ffmpeg" -version: "4.0.3-5" +version: "4.0.3-6" packages: - stretch-amd64 - stretch-armhf + - stretch-arm64 - buster-amd64 - buster-armhf + - buster-arm64 - xenial-amd64 - bionic-amd64 - bionic-armhf + - bionic-arm64 - cosmic-amd64 - cosmic-armhf + - cosmic-arm64 + - disco-amd64 + - disco-armhf + - disco-arm64 diff --git a/debian/changelog b/debian/changelog index dc871209e..83f4b79e3 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,10 @@ +jellyfin-ffmpeg (4.0.3-6) unstable; urgency=medium + + * Add Ubuntu Disco support + * Add arm64 support + + -- Joshua Boniface Mon, 29 Apr 2019 10:51:22 -0400 + jellyfin-ffmpeg (4.0.3-5) unstable; urgency=medium * Add support for nvenv/nvdec transcoding on amd64 diff --git a/debian/control b/debian/control index 8ee6e5b78..b73d34037 100644 --- a/debian/control +++ b/debian/control @@ -51,7 +51,7 @@ Build-Depends: # [!armhf] is needed otherwise mk-build-deps creates an invalid build # dep list, targeting armhf specifically when the packge is any. # The docker build guarantees this is installed for armhf crossbuild. - nv-codec-headers [!armhf], + nv-codec-headers [!armhf !arm64], # used to detect libraries pkg-config, # HTML documentation @@ -62,7 +62,7 @@ Build-Depends: zlib1g-dev Package: jellyfin-ffmpeg -Architecture: amd64 armhf +Architecture: amd64 armhf arm64 Multi-Arch: foreign Depends: ${shlibs:Depends}, diff --git a/debian/rules b/debian/rules index 7d1907222..86970501c 100755 --- a/debian/rules +++ b/debian/rules @@ -49,23 +49,26 @@ CONFIG_ARM := --enable-cross-compile \ --cross-prefix=/usr/bin/arm-linux-gnueabihf- \ --arch=armhf +CONFIG_ARM64 := --enable-cross-compile \ + --cross-prefix=/usr/bin/aarch64-linux-gnu- \ + --arch=arm64 + CONFIG_x86 := --arch=amd64 \ --enable-nvenc --enable-nvdec HOST_ARCH := $(shell arch) BUILD_ARCH := ${DEB_HOST_MULTIARCH} -ifeq ($(HOST_ARCH),x86_64) - ifeq ($(BUILD_ARCH),arm-linux-gnueabihf) - # Cross-building ARM on AMD64 - CONFIG += $(CONFIG_ARM) - else - # Building AMD64 - CONFIG += $(CONFIG_x86) - endif +ifeq ($(BUILD_ARCH),x86_64) + # Native amd64 build + CONFIG += $(CONFIG_x86) endif -ifeq ($(HOST_ARCH),armv7l) - # Building ARM - CONFIG += $(CONFIG_ARM) +ifeq ($(BUILD_ARCH),arm-linux-gnueabihf) + # Cross-building ARM on AMD64 + CONFIG += $(CONFIG_ARM) +endif +ifeq ($(BUILD_ARCH),aarch64-linux-gnu) + # Cross-building ARM64 on AMD64 + CONFIG += $(CONFIG_ARM64) endif %: diff --git a/docker-build.sh b/docker-build.sh index 7803aec7a..ebf4c7da1 100755 --- a/docker-build.sh +++ b/docker-build.sh @@ -8,7 +8,7 @@ set -o errexit set -o xtrace # Prepare the cross-toolchain -prepare_crossbuild_env() { +prepare_crossbuild_env_armhf() { # Prepare the Ubuntu-specific cross-build requirements if [[ $( lsb_release -i -s ) == "Ubuntu" ]]; then CODENAME="$( lsb_release -c -s )" @@ -41,6 +41,39 @@ EOF yes | apt-get install -y gcc-${GCC_VER}-source libstdc++6-armhf-cross binutils-arm-linux-gnueabihf bison flex libtool gdb sharutils netbase libmpc-dev libmpfr-dev libgmp-dev systemtap-sdt-dev autogen expect chrpath zlib1g-dev zip libc6-dev:armhf linux-libc-dev:armhf libgcc1:armhf libcurl4-openssl-dev:armhf libfontconfig1-dev:armhf libfreetype6-dev:armhf liblttng-ust0:armhf libstdc++6:armhf popd } +prepare_crossbuild_env_arm64() { + # Prepare the Ubuntu-specific cross-build requirements + if [[ $( lsb_release -i -s ) == "Ubuntu" ]]; then + CODENAME="$( lsb_release -c -s )" + # Remove the default sources.list + rm /etc/apt/sources.list + # Add arch-specific list files + cat < /etc/apt/sources.list.d/amd64.list +deb [arch=amd64] http://archive.ubuntu.com/ubuntu/ ${CODENAME} main restricted universe multiverse +deb [arch=amd64] http://archive.ubuntu.com/ubuntu/ ${CODENAME}-updates main restricted universe multiverse +deb [arch=amd64] http://archive.ubuntu.com/ubuntu/ ${CODENAME}-backports main restricted universe multiverse +deb [arch=amd64] http://archive.ubuntu.com/ubuntu/ ${CODENAME}-security main restricted universe multiverse +EOF + cat < /etc/apt/sources.list.d/arm64.list +deb [arch=arm64] http://ports.ubuntu.com/ ${CODENAME} main restricted universe multiverse +deb [arch=arm64] http://ports.ubuntu.com/ ${CODENAME}-updates main restricted universe multiverse +deb [arch=arm64] http://ports.ubuntu.com/ ${CODENAME}-backports main restricted universe multiverse +deb [arch=arm64] http://ports.ubuntu.com/ ${CODENAME}-security main restricted universe multiverse +EOF + fi + # Add armhf architecture + dpkg --add-architecture arm64 + # Update and install cross-gcc-dev + apt-get update + yes | apt-get install -y cross-gcc-dev + # Generate gcc cross source + TARGET_LIST="arm64" cross-gcc-gensource ${GCC_VER} + # Install dependencies + pushd cross-gcc-packages-amd64/cross-gcc-${GCC_VER}-arm64 + ln -fs /usr/share/zoneinfo/America/Toronto /etc/localtime + yes | apt-get install -y gcc-${GCC_VER}-source libstdc++6-arm64-cross binutils-aarch64-linux-gnu bison flex libtool gdb sharutils netbase libmpc-dev libmpfr-dev libgmp-dev systemtap-sdt-dev autogen expect chrpath zlib1g-dev zip libc6-dev:arm64 linux-libc-dev:arm64 libgcc1:arm64 libcurl4-openssl-dev:arm64 libfontconfig1-dev:arm64 libfreetype6-dev:arm64 liblttng-ust0:arm64 libstdc++6:arm64 + popd +} # Set the architecture-specific options case ${ARCH} in @@ -50,12 +83,19 @@ case ${ARCH} in BUILD_ARCH_OPT="" ;; 'armhf') - prepare_crossbuild_env + prepare_crossbuild_env_armhf ln -s /usr/bin/arm-linux-gnueabihf-gcc-6 /usr/bin/arm-linux-gnueabihf-gcc CONFIG_SITE="/etc/dpkg-cross/cross-config.${ARCH}" DEP_ARCH_OPT="--host-arch armhf" BUILD_ARCH_OPT="-aarmhf" ;; + 'arm64') + prepare_crossbuild_env_arm64 + #ln -s /usr/bin/arm-linux-gnueabihf-gcc-6 /usr/bin/arm-linux-gnueabihf-gcc + CONFIG_SITE="/etc/dpkg-cross/cross-config.${ARCH}" + DEP_ARCH_OPT="--host-arch arm64" + BUILD_ARCH_OPT="-aarm64" + ;; esac # Download and install the nvidia headers from deb-multimedia