#!/usr/bin/make -f export ROOT = $(CURDIR)/debian/tmp export PMONDIR = /usr/share/starlingx/pmon.d export VER = $(shell dpkg-parsechangelog | egrep '^Version:' | cut -f 2 -d ' ') export VER_MJR = $(shell echo $(VER) | cut -d. -f1) export DEB_HOST_ARCH = $(shell dpkg-architecture -qDEB_HOST_ARCH 2>/dev/null) %: dh $@ override_dh_auto_build: ifeq ($(DEB_HOST_ARCH),arm64) sed -i "s/x86_64/aarch64/" $(CURDIR)/src/Makefile endif dh_auto_build override_dh_auto_install: $(MAKE) DEST_DIR=${ROOT} \ BIN_DIR=usr/bin \ UNIT_DIR=/lib/systemd/system \ LIB_DIR=/usr/lib \ INC_DIR=/usr/include \ BUILDSUBDIR=$(CURDIR) \ ETC_DIR=etc \ PMONDIR=${PMONDIR} \ VER=${VER} \ VER_MJR=${VER_MJR} \ install # Prevents dh_fixperms from changing the permissions defined in the makefiles override_dh_fixperms: dh_fixperms \ -Xlibsm_common.so.* \ -Xsm-eru* override_dh_installsystemd: dh_installsystemd -psm-eru sm-eru.service