rules 1000 B

12345678910111213141516171819202122232425262728293031323334353637383940
  1. #! /usr/bin/make -f
  2. CONFIG := Release
  3. TERM := xterm
  4. SHELL := /bin/bash
  5. HOST_ARCH := $(shell arch)
  6. BUILD_ARCH := ${DEB_HOST_MULTIARCH}
  7. ifeq ($(HOST_ARCH),x86_64)
  8. ifeq ($(BUILD_ARCH),arm-linux-gnueabihf)
  9. # Cross-building ARM on AMD64
  10. DOTNETRUNTIME := debian-arm
  11. else
  12. # Building AMD64
  13. DOTNETRUNTIME := debian-x64
  14. endif
  15. endif
  16. ifeq ($(HOST_ARCH),armv7l)
  17. # Building ARM
  18. DOTNETRUNTIME := debian-arm
  19. endif
  20. export DH_VERBOSE=1
  21. export DOTNET_CLI_TELEMETRY_OPTOUT=1
  22. %:
  23. dh $@
  24. # disable "make check"
  25. override_dh_auto_test:
  26. # disable stripping debugging symbols
  27. override_dh_clistrip:
  28. override_dh_auto_build:
  29. dotnet publish --configuration $(CONFIG) --output='$(CURDIR)/usr/lib/jellyfin/bin' --self-contained --runtime $(DOTNETRUNTIME) \
  30. "-p:GenerateDocumentationFile=false;DebugSymbols=false;DebugType=none" Jellyfin.Server
  31. override_dh_auto_clean:
  32. dotnet clean -maxcpucount:1 --configuration $(CONFIG) Jellyfin.Server || true
  33. rm -rf '$(CURDIR)/usr'