sm: fix the hardcoded includes for arm64
The includes path in Makefile is hardcoded with x86_64, use dpkg-architecture to check the host arch and replace the hardcoded name. Test Plan: PASS: build-pkgs on x86-64 host PASS: build-image on x86-64 host PASS: build-pkgs on arm64 host PASS: build-image on arm64 host PASS: Deploy AIO-SX on x86-64 targets and check sm service PASS: Deploy AIO-SX on arm64 targets and check sm service PASS: Deploy AIO-DX on arm64 targets and check sm service PASS: Deploy std (2+2+2) on arm64 targets and check sm service Story: 2010739 Task: 48017 Change-Id: Ie22477b7ec7df63377f666186d95201cd16f5809 Signed-off-by: Jackie Huang <jackie.huang@windriver.com>
This commit is contained in:
parent
4b800442ed
commit
15a8ffeee0
@ -6,10 +6,17 @@ export PMONDIR = /usr/share/starlingx/pmon.d
|
|||||||
export VER = $(shell dpkg-parsechangelog | egrep '^Version:' | cut -f 2 -d ' ')
|
export VER = $(shell dpkg-parsechangelog | egrep '^Version:' | cut -f 2 -d ' ')
|
||||||
export VER_MJR = $(shell echo $(VER) | cut -d. -f1)
|
export VER_MJR = $(shell echo $(VER) | cut -d. -f1)
|
||||||
|
|
||||||
|
export DEB_HOST_ARCH = $(shell dpkg-architecture -qDEB_HOST_ARCH 2>/dev/null)
|
||||||
|
|
||||||
%:
|
%:
|
||||||
dh $@
|
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:
|
override_dh_auto_install:
|
||||||
$(MAKE) DEST_DIR=${ROOT} \
|
$(MAKE) DEST_DIR=${ROOT} \
|
||||||
BIN_DIR=usr/bin \
|
BIN_DIR=usr/bin \
|
||||||
|
@ -4,10 +4,15 @@ export ROOT = $(CURDIR)/debian/tmp
|
|||||||
export VER = $(shell dpkg-parsechangelog | egrep '^Version:' | cut -f 2 -d ' ')
|
export VER = $(shell dpkg-parsechangelog | egrep '^Version:' | cut -f 2 -d ' ')
|
||||||
export VER_MJR = $(shell echo $(VER) | cut -d. -f1)
|
export VER_MJR = $(shell echo $(VER) | cut -d. -f1)
|
||||||
|
|
||||||
|
export DEB_HOST_ARCH = $(shell dpkg-architecture -qDEB_HOST_ARCH 2>/dev/null)
|
||||||
|
|
||||||
%:
|
%:
|
||||||
dh $@
|
dh $@
|
||||||
|
|
||||||
override_dh_auto_build:
|
override_dh_auto_build:
|
||||||
|
ifeq ($(DEB_HOST_ARCH),arm64)
|
||||||
|
sed -i "s/x86_64/aarch64/" $(CURDIR)/src/Makefile
|
||||||
|
endif
|
||||||
sqlite3 database/sm.db < database/create_sm_db.sql
|
sqlite3 database/sm.db < database/create_sm_db.sql
|
||||||
sqlite3 database/sm.hb.db < database/create_sm_hb_db.sql
|
sqlite3 database/sm.hb.db < database/create_sm_hb_db.sql
|
||||||
dh_auto_build
|
dh_auto_build
|
||||||
|
@ -4,6 +4,8 @@ ROOT := $(CURDIR)/debian/tmp
|
|||||||
PMONDIR := /usr/share/starlingx/pmon.d
|
PMONDIR := /usr/share/starlingx/pmon.d
|
||||||
UNIT_DIR := /lib/systemd/system
|
UNIT_DIR := /lib/systemd/system
|
||||||
|
|
||||||
|
export DEB_HOST_ARCH = $(shell dpkg-architecture -qDEB_HOST_ARCH 2>/dev/null)
|
||||||
|
|
||||||
%:
|
%:
|
||||||
dh $@
|
dh $@
|
||||||
|
|
||||||
@ -11,6 +13,12 @@ override_dh_usrlocal:
|
|||||||
# dh_usrlocal complains about files being put in /usr/local
|
# dh_usrlocal complains about files being put in /usr/local
|
||||||
# this empty override causes dh_usrlocal to be skipped.
|
# 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:
|
override_dh_auto_install:
|
||||||
$(MAKE) DEST_DIR=${ROOT} \
|
$(MAKE) DEST_DIR=${ROOT} \
|
||||||
PMONDIR=${PMONDIR} \
|
PMONDIR=${PMONDIR} \
|
||||||
|
Loading…
Reference in New Issue
Block a user