diff --git a/platform/broadcom/sonic-platform-modules-accton/debian/rules b/platform/broadcom/sonic-platform-modules-accton/debian/rules index c57cfcb6ed..3676292e5c 100755 --- a/platform/broadcom/sonic-platform-modules-accton/debian/rules +++ b/platform/broadcom/sonic-platform-modules-accton/debian/rules @@ -25,8 +25,8 @@ MODULE_DIRS += as5835-54x as9716-32d as9726-32d as5835-54t as7312-54xs as7315-27 MODULE_DIR := modules UTILS_DIR := utils SERVICE_DIR := service -CONF_DIR := conf UDEV_DIR := udev +CONF_DIR := conf %: dh $@ --with systemd,python3 --buildsystem=pybuild @@ -70,15 +70,11 @@ binary-indep: dh_installdirs -p$(PACKAGE_PRE_NAME)-$${mod} $(KERNEL_SRC)/$(INSTALL_MOD_DIR); \ dh_installdirs -p$(PACKAGE_PRE_NAME)-$${mod} usr/local/bin; \ dh_installdirs -p$(PACKAGE_PRE_NAME)-$${mod} lib/systemd/system; \ - if [ -d $(MOD_SRC_DIR)/$${mod}/$(UDEV_DIR) ]; then \ - dh_installdirs -p$(PACKAGE_PRE_NAME)-$${mod} etc/udev/rules.d; \ - fi; \ + dh_installdirs -p$(PACKAGE_PRE_NAME)-$${mod} etc/udev/rules.d; \ cp $(MOD_SRC_DIR)/$${mod}/$(MODULE_DIR)/*.ko debian/$(PACKAGE_PRE_NAME)-$${mod}/$(KERNEL_SRC)/$(INSTALL_MOD_DIR); \ cp $(MOD_SRC_DIR)/$${mod}/$(UTILS_DIR)/* debian/$(PACKAGE_PRE_NAME)-$${mod}/usr/local/bin/; \ cp $(MOD_SRC_DIR)/$${mod}/$(SERVICE_DIR)/*.service debian/$(PACKAGE_PRE_NAME)-$${mod}/lib/systemd/system/; \ - if [ -f $(MOD_SRC_DIR)/$${mod}/$(UDEV_DIR)/* ]; then \ - cp $(MOD_SRC_DIR)/$${mod}/$(UDEV_DIR)/* debian/$(PACKAGE_PRE_NAME)-$${mod}/etc/udev/rules.d/; \ - fi; \ + cp $(MOD_SRC_DIR)/$${mod}/$(UDEV_DIR)/* debian/$(PACKAGE_PRE_NAME)-$${mod}/etc/udev/rules.d/; \ $(PYTHON3) $${mod}/setup.py install --root=$(MOD_SRC_DIR)/debian/$(PACKAGE_PRE_NAME)-$${mod} --install-layout=deb; \ done) # Resuming debhelper scripts @@ -98,3 +94,4 @@ binary-indep: dh_md5sums dh_builddeb .PHONY: build binary binary-arch binary-indep clean +