From 07d45e82f05692cab2cd68f35b268feb9cc2a3a0 Mon Sep 17 00:00:00 2001 From: Joshua Boniface Date: Sun, 20 Oct 2019 12:13:15 -0400 Subject: Move web-build into Debian build rules This removes the convoluted steps in docker-build.sh in favour of integrating the web-build sequence into the Debian rules file explicitly. This will allow the web-build to work properly outside of the boutique Docker container we build, thus allowing it to be build properly directly on a target system with dpkg-buildpackage. --- deployment/debian-package-x64/pkg-src/rules | 15 +++++++++++++++ 1 file changed, 15 insertions(+) mode change 100644 => 100755 deployment/debian-package-x64/pkg-src/rules (limited to 'deployment/debian-package-x64/pkg-src/rules') diff --git a/deployment/debian-package-x64/pkg-src/rules b/deployment/debian-package-x64/pkg-src/rules old mode 100644 new mode 100755 index 2a5d41a696..c2d57dfb22 --- a/deployment/debian-package-x64/pkg-src/rules +++ b/deployment/debian-package-x64/pkg-src/rules @@ -2,6 +2,8 @@ CONFIG := Release TERM := xterm SHELL := /bin/bash +WEB_TARGET := $(CURDIR)/MediaBrowser.WebDashboard/jellyfin-web +WEB_VERSION := $(shell sed -n -e 's/^version: "\(.*\)"/\1/p' $(CURDIR)/build.yaml) HOST_ARCH := $(shell arch) BUILD_ARCH := ${DEB_HOST_MULTIARCH} @@ -39,12 +41,25 @@ override_dh_auto_test: override_dh_clistrip: override_dh_auto_build: + echo $(WEB_VERSION) + # Clone down and build Web frontend + mkdir -p $(WEB_TARGET) + wget -O web-src.tgz https://github.com/jellyfin/jellyfin-web/archive/v$(WEB_VERSION).tar.gz || wget -O web-src.tgz https://github.com/jellyfin/jellyfin-web/archive/master.tar.gz + mkdir -p $(CURDIR)/web + tar -xzf web-src.tgz -C $(CURDIR)/web/ --strip 1 + cd $(CURDIR)/web/ && npm install yarn + cd $(CURDIR)/web/ && node_modules/yarn/bin/yarn install + mv $(CURDIR)/web/dist/* $(WEB_TARGET)/ + # Build the application dotnet publish --configuration $(CONFIG) --output='$(CURDIR)/usr/lib/jellyfin/bin' --self-contained --runtime $(DOTNETRUNTIME) \ "-p:GenerateDocumentationFile=false;DebugSymbols=false;DebugType=none" Jellyfin.Server override_dh_auto_clean: dotnet clean -maxcpucount:1 --configuration $(CONFIG) Jellyfin.Server || true + rm -f '$(CURDIR)/web-src.tgz' rm -rf '$(CURDIR)/usr' + rm -rf '$(CURDIR)/web' + rm -rf '$(WEB_TARGET)' # Force the service name to jellyfin even if we're building jellyfin-nightly override_dh_installinit: -- cgit v1.2.3