rules 2.3 KB

1234567891011121314151617181920212223242526272829303132333435363738
  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. sed -i -e 's%<dllmap dll="sqlite3" target="libsqlite3.so" os="linux"/>%<dllmap dll="sqlite3" target="libembysqlite3.so.0" os="linux"/>%' $(CURDIR)/MediaBrowser.Server.Mono/SQLitePCLRaw.provider.sqlite3.dll.config
  14. $(eval libdl_count := $(shell grep -c "libdl" $(CURDIR)/MediaBrowser.Server.Mono/SQLitePCLRaw.provider.sqlite3.dll.config))
  15. @ if [[ "$(libdl_count)" -eq "0" ]]; then \
  16. 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; \
  17. else \
  18. 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; \
  19. fi
  20. endif
  21. msbuild $(CURDIR)/MediaBrowser.sln /p:Configuration="Release Mono" /p:Platform="Any Cpu" /property:OutputPath='$(CURDIR)/usr/lib/emby-server/bin' /t:build
  22. override_dh_auto_clean:
  23. msbuild $(CURDIR)/MediaBrowser.sln /p:Configuration="Release Mono" /p:Platform="Any Cpu" /t:clean
  24. # disable package does not produce library files
  25. override_dh_makeclilibs:
  26. override_dh_clideps:
  27. 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
  28. override_dh_installinit:
  29. # use "emby-server" as our service name, not "emby-server-beta"
  30. dh_installinit --name=emby-server --no-start --noscripts