diff options
author | Christian Poessinger <christian@poessinger.com> | 2021-02-06 22:40:28 +0100 |
---|---|---|
committer | Christian Poessinger <christian@poessinger.com> | 2021-02-06 22:40:28 +0100 |
commit | 96d1c8148bbc3d7fbe6438d34dbd0ceb85fab3ff (patch) | |
tree | 8a5f1637cf8bf7f75a892b06a91297a599c660ab /debian | |
parent | 1db7de06c5b66a72f63ead40744315ba5e138728 (diff) | |
download | vyos-1x-96d1c8148bbc3d7fbe6438d34dbd0ceb85fab3ff.tar.gz vyos-1x-96d1c8148bbc3d7fbe6438d34dbd0ceb85fab3ff.zip |
Debian: only build XDP for amd64 architecture
Diffstat (limited to 'debian')
-rwxr-xr-x | debian/rules | 18 |
1 files changed, 13 insertions, 5 deletions
diff --git a/debian/rules b/debian/rules index ab0df7201..8e5aee3e6 100755 --- a/debian/rules +++ b/debian/rules @@ -12,6 +12,8 @@ MIGRATION_SCRIPTS_DIR := opt/vyatta/etc/config-migrate/migrate SYSTEM_SCRIPTS_DIR := usr/libexec/vyos/system SERVICES_DIR := usr/libexec/vyos/services +DEB_TARGET_ARCH := $(shell dpkg-architecture -qDEB_TARGET_ARCH) + %: dh $@ --with python3, --with quilt @@ -20,6 +22,10 @@ override_dh_gencontrol: override_dh_auto_build: make all +ifeq ($(DEB_TARGET_ARCH),amd64) + # Only build XDP on amd64 systems + make vyxdp +endif override_dh_auto_install: dh_auto_install @@ -78,11 +84,6 @@ override_dh_auto_install: mkdir -p $(DIR)/$(VYOS_DATA_DIR) cp -r data/* $(DIR)/$(VYOS_DATA_DIR) - # Install XDP plugins - mkdir -p $(DIR)/$(VYOS_DATA_DIR)/xdp - cp -r src/xdp/xdp_prog_kern.o $(DIR)/$(VYOS_DATA_DIR)/xdp - find src/xdp -perm /a+x -exec cp {} $(DIR)/$(VYOS_SBIN_DIR) \; - # Install etc configuration files mkdir -p $(DIR)/etc cp -r src/etc/* $(DIR)/etc @@ -109,3 +110,10 @@ override_dh_auto_install: # Install system programs mkdir -p $(DIR)/$(VYOS_BIN_DIR) cp -r smoketest/bin/* $(DIR)/$(VYOS_BIN_DIR) + +ifeq ($(DEB_TARGET_ARCH),amd64) + # We only install XDP on amd64 systems + mkdir -p $(DIR)/$(VYOS_DATA_DIR)/xdp + cp -r src/xdp/xdp_prog_kern.o $(DIR)/$(VYOS_DATA_DIR)/xdp + find src/xdp -perm /a+x -exec cp {} $(DIR)/$(VYOS_SBIN_DIR) \; +endif |