#!/usr/bin/make -f

export QT_SELECT=5
include /usr/share/dpkg/default.mk

DEB_BUILD_ARCH ?= $(shell dpkg-architecture -qDEB_BUILD_ARCH)
DEB_BUILD_OPTIONS=nocheck

SYSTYPE = $(shell cat /usr/lib/deepin/desktop-version | grep Type= | awk -F'=' '{print $$2}')

%:
	dh $@ --parallel

override_dh_shlibdeps:
	dh_shlibdeps -l$(shell pwd)/debian/dde-sharefiles/usr/share/dde-file-manager/sharefiles/lib

override_dh_auto_configure:
	dh_auto_configure -- \
        -DCMAKE_INSTALL_PREFIX=/usr \
	-DCMAKE_BUILD_TYPE=Release \
	-DAPP_VERSION=$(DEB_VERSION_UPSTREAM) -DVERSION=$(DEB_VERSION_UPSTREAM) LIB_INSTALL_DIR=/usr/lib/$(DEB_HOST_MULTIARCH)

override_dh_auto_build:
	dh_auto_build -- -j8

override_dh_auto_install:
	dh_auto_install --destdir=debian/tmp
	
override_dh_shlibdeps:
	dh_shlibdeps --dpkg-shlibdeps-params=--ignore-missing-info