sonic-buildimage/platform/barefoot/sonic-platform-modules-bfn-montara/debian/rules
novikauanton 66b6dcb5bd
[platform/barefoot] fix bullseye build system (#9779)
* use py3 for dh build
* use pybuild for python packages
2022-01-22 10:33:34 -08:00

33 lines
975 B
Makefile
Executable File

#!/usr/bin/make -f
PLATFORM_NAME := x86_64-accton_wedge100bf_32x-r0
PACKAGE_NAME := sonic-platform-modules-bfn-montara
SCRIPT_SRC := $(shell pwd)/scripts
CONFIGS_SRC := $(shell pwd)/configs
BUILD_DIR := $(shell pwd)/build
WHEEL_BUILD_DIR := $(BUILD_DIR)/wheel
%:
dh $@ --with python3 --buildsystem=pybuild
override_dh_auto_build:
set -e
python3 setup.py bdist_wheel -d $(WHEEL_BUILD_DIR)
set +e
override_dh_auto_install:
dh_installdirs -p$(PACKAGE_NAME) usr/local/bin
cp -r $(SCRIPT_SRC)/* debian/$(PACKAGE_NAME)/usr/local/bin
dh_installdirs -p$(PACKAGE_NAME) etc/network/interfaces.d/
cp -r $(CONFIGS_SRC)/network/interfaces.d/* debian/$(PACKAGE_NAME)/etc/network/interfaces.d/
dh_installdirs -p$(PACKAGE_NAME) usr/share/sonic/device/$(PLATFORM_NAME)/
cp -r $(WHEEL_BUILD_DIR)/* debian/$(PACKAGE_NAME)/usr/share/sonic/device/$(PLATFORM_NAME)/
override_dh_usrlocal:
override_dh_clean:
rm -fr $(WHEEL_BUILD_DIR)
rm -fr *.egg-info
rm -fr $(BUILD)
dh_clean