ha/service-mgmt/sm/debian/deb_folder/rules

36 lines
773 B
Makefile
Executable File

#!/usr/bin/make -f
ROOT := $(CURDIR)/debian/tmp
PMONDIR := /usr/share/starlingx/pmon.d
UNIT_DIR := /lib/systemd/system
export DEB_HOST_ARCH = $(shell dpkg-architecture -qDEB_HOST_ARCH 2>/dev/null)
%:
dh $@
override_dh_usrlocal:
# dh_usrlocal complains about files being put in /usr/local
# this empty override causes dh_usrlocal to be skipped.
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} \
PMONDIR=${PMONDIR} \
UNIT_DIR=${UNIT_DIR} \
install
dh_install
override_dh_installsystemd:
dh_installsystemd -psm sm.service
dh_installsystemd -psm sm-shutdown.service
override_dh_python3:
dh_python3 --shebang=/usr/bin/python3