#!/usr/bin/make -f
include /usr/share/dpkg/default.mk

SYSTYPE = Desktop
DISTRO = x86
ifeq ($(DEB_BUILD_ARCH), amd64)
	DISTRO = x86
endif
ifeq ($(DEB_BUILD_ARCH), i386)
	DISTRO = x86
endif
SYSTYPE=$(shell cat /etc/deepin-version | grep Type= | awk -F'=' '{print $$2}')
ifeq ($(SYSTYPE), Professional)
        DISTRO = pro
endif
ifeq ($(DEB_BUILD_ARCH), mipsel)
	DISTRO = mips
endif
ifeq ($(DEB_BUILD_ARCH), mips64el)
	DISTRO = mips
endif
ifeq ($(DEB_BUILD_ARCH), sw_64)
	DISTRO = sw
endif
ifeq ($(DEB_BUILD_ARCH), arm64)
	DISTRO = arm
endif
export DISTRO

%: 
	dh $@

override_dh_auto_build:
	dh_auto_build -- DISTRO=$(DISTRO)
override_dh_auto_install:
	dh_auto_install -- DISTRO=$(DISTRO)
