2018-08-08 05:18:59 +00:00
|
|
|
#! /usr/bin/make -f
|
|
|
|
SHELL := /bin/bash
|
|
|
|
export DH_VERBOSE=1
|
|
|
|
|
|
|
|
%:
|
|
|
|
dh $@ --with=cli
|
|
|
|
|
|
|
|
# disable "make check"
|
|
|
|
override_dh_auto_test:
|
|
|
|
|
|
|
|
# disable stripping debugging symbols
|
|
|
|
override_dh_clistrip:
|
|
|
|
|
|
|
|
override_dh_auto_build:
|
|
|
|
ifneq ("$(wildcard $(CURDIR)/MediaBrowser.Server.Mono/SQLitePCLRaw.provider.sqlite3.dll.config)","")
|
|
|
|
$(eval libdl_count := $(shell grep -c "libdl" $(CURDIR)/MediaBrowser.Server.Mono/SQLitePCLRaw.provider.sqlite3.dll.config))
|
|
|
|
@ if [[ "$(libdl_count)" -eq "0" ]]; then \
|
|
|
|
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; \
|
|
|
|
else \
|
|
|
|
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; \
|
|
|
|
fi
|
|
|
|
endif
|
2018-08-08 05:42:25 +00:00
|
|
|
msbuild $(CURDIR)/MediaBrowser.sln /p:Configuration="Release Mono" /p:Platform="Any Cpu" /property:OutputPath='$(CURDIR)/usr/lib/emby-server/bin' /t:build
|
2018-08-08 05:18:59 +00:00
|
|
|
|
|
|
|
override_dh_auto_clean:
|
2018-08-08 05:42:25 +00:00
|
|
|
msbuild $(CURDIR)/MediaBrowser.sln /p:Configuration="Release Mono" /p:Platform="Any Cpu" /t:clean
|
2018-08-08 05:18:59 +00:00
|
|
|
|
|
|
|
# disable package does not produce library files
|
|
|
|
override_dh_makeclilibs:
|
|
|
|
|
|
|
|
override_dh_clideps:
|
2018-08-10 17:36:43 +00:00
|
|
|
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
|
2018-08-08 05:18:59 +00:00
|
|
|
|
|
|
|
override_dh_installinit:
|
|
|
|
# use "emby-server" as our service name, not "emby-server-beta"
|
|
|
|
dh_installinit --name=emby-server --no-start --noscripts
|