diff options
| author | Joshua Boniface <joshua@boniface.me> | 2019-10-20 12:13:15 -0400 |
|---|---|---|
| committer | Joshua Boniface <joshua@boniface.me> | 2019-10-20 12:58:10 -0400 |
| commit | 07d45e82f05692cab2cd68f35b268feb9cc2a3a0 (patch) | |
| tree | 704ac0598678ad6c40be006b512cea677ab5b851 /deployment/debian-package-x64/pkg-src/rules | |
| parent | fdb0c3a1dff0c1e9c3c22a3be688b97ea0bd7a6d (diff) | |
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.
Diffstat (limited to 'deployment/debian-package-x64/pkg-src/rules')
| -rwxr-xr-x[-rw-r--r--] | deployment/debian-package-x64/pkg-src/rules | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/deployment/debian-package-x64/pkg-src/rules b/deployment/debian-package-x64/pkg-src/rules index 2a5d41a69..c2d57dfb2 100644..100755 --- 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: |
