rules 2.1 KB

12345678910111213141516171819202122232425262728293031323334353637
  1. #! /usr/bin/make -f
  2. SHELL := /bin/bash
  3. export DH_VERBOSE=1
  4. %:
  5. dh $@ --with=cli
  6. # disable "make check"
  7. override_dh_auto_test:
  8. # disable stripping debugging symbols
  9. override_dh_clistrip:
  10. override_dh_auto_build:
  11. sed -i -e 's%<dllmap dll="CORE_RL_Wand_.dll" target="libMagickWand-6.Q8.so" os="linux"/>%<dllmap dll="CORE_RL_Wand_.dll" target="libEmbyMagickWand-6.Q8.so.2" os="linux"/>\n<dllmap dll="CORE_RL_magick_.dll" target="libEmbyMagickCore-6.Q8.so.2" os="linux"/>%' $(CURDIR)/MediaBrowser.Server.Mono/ImageMagickSharp.dll.config
  12. ifneq ("$(wildcard $(CURDIR)/MediaBrowser.Server.Mono/SQLitePCLRaw.provider.sqlite3.dll.config)","")
  13. $(eval libdl_count := $(shell grep -c "libdl" $(CURDIR)/MediaBrowser.Server.Mono/SQLitePCLRaw.provider.sqlite3.dll.config))
  14. @ if [[ "$(libdl_count)" -eq "0" ]]; then \
  15. sed -i -e 's%\(</configuration>\)%<dllmap dll="dl" target="libdl.so.2" os="linux"/>\n\1%' $(CURDIR)/MediaBrowser.Server.Mono/SQLitePCLRaw.provider.sqlite3.dll.config; \
  16. else \
  17. sed -i -e 's%<dllmap dll="dl" target="libdl.so" os="linux"/>%<dllmap dll="dl" target="libdl.so.2" os="linux"/>%' $(CURDIR)/MediaBrowser.Server.Mono/SQLitePCLRaw.provider.sqlite3.dll.config; \
  18. fi
  19. endif
  20. msbuild $(CURDIR)/MediaBrowser.sln /p:Configuration="Release Mono" /p:Platform="Any Cpu" /property:OutputPath='$(CURDIR)/usr/lib/emby-server/bin' /t:build
  21. override_dh_auto_clean:
  22. msbuild $(CURDIR)/MediaBrowser.sln /p:Configuration="Release Mono" /p:Platform="Any Cpu" /t:clean
  23. # disable package does not produce library files
  24. override_dh_makeclilibs:
  25. override_dh_clideps:
  26. dh_clideps --exclude-moduleref=i:ole32 --exclude-moduleref=i:msvcrt --exclude-moduleref=i:Mono.Posix.dll --exclude-moduleref=i:MonoPosixHelper --exclude-moduleref=i:CORE_RL_Wand_ --exclude-moduleref=i:MediaInfo --exclude-moduleref=i:CORE_RL_magick_ --exclude-moduleref=i:sqlite3 --exclude-moduleref=i:libSkiaSharp --exclude-moduleref=i:SkiaSharp --exclude-moduleref=i:libEGL.dll --exclude-moduleref=ntdll.dll
  27. override_dh_installinit:
  28. # use "emby-server" as our service name, not "emby-server-beta"
  29. dh_installinit --name=emby-server --no-start --noscripts