mirror of
https://github.com/openwrt/packages.git
synced 2025-12-22 01:44:32 +04:00
mstflint: make Python dependency optional
This commit adds a configuration symbol for the package to make Python an optional dependency. If unselected, Python packages won't be selected, and the Python-dependent tools msftwreset, mstfwtrace, mstprivhost, mstresourcedump, and mstresourceparse won't be included in the mstflint package. Signed-off-by: Til Kaiser <mail@tk154.de>
This commit is contained in:
@@ -32,9 +32,8 @@ define Package/mstflint
|
|||||||
TITLE:=Mellanox Firmware Burning and Diagnostics Tools
|
TITLE:=Mellanox Firmware Burning and Diagnostics Tools
|
||||||
URL:=https://github.com/Mellanox/mstflint
|
URL:=https://github.com/Mellanox/mstflint
|
||||||
DEPENDS:=@!(mips||mips64||mipsel) \
|
DEPENDS:=@!(mips||mips64||mipsel) \
|
||||||
+libcurl +liblzma +libopenssl +libsqlite3 \
|
+libcurl +liblzma +libopenssl \
|
||||||
+libstdcpp +libxml2 +python3-ctypes \
|
+libsqlite3 +libstdcpp +libxml2 +zlib
|
||||||
+python3-urllib +python3-xml +zlib
|
|
||||||
endef
|
endef
|
||||||
|
|
||||||
define Package/mstflint/description
|
define Package/mstflint/description
|
||||||
@@ -75,6 +74,20 @@ define Package/mstflint/description
|
|||||||
link status and issues related to them.
|
link status and issues related to them.
|
||||||
endef
|
endef
|
||||||
|
|
||||||
|
define Package/mstflint/config
|
||||||
|
config PACKAGE_MSTFLINT_INCLUDE_PYTHON
|
||||||
|
bool "Include Python-dependent tools"
|
||||||
|
default y
|
||||||
|
depends on PACKAGE_mstflint
|
||||||
|
select PACKAGE_python3-ctypes
|
||||||
|
select PACKAGE_python3-logging
|
||||||
|
select PACKAGE_python3-xml
|
||||||
|
help
|
||||||
|
All mstflint tools including the following Python-dependent:
|
||||||
|
msftwreset, mstfwtrace, mstprivhost,
|
||||||
|
mstresourcedump, mstresourceparse
|
||||||
|
endef
|
||||||
|
|
||||||
CONFIGURE_ARGS += \
|
CONFIGURE_ARGS += \
|
||||||
--enable-fw-mgr \
|
--enable-fw-mgr \
|
||||||
--disable-inband
|
--disable-inband
|
||||||
@@ -85,13 +98,32 @@ TARGET_CFLAGS += \
|
|||||||
|
|
||||||
define Package/mstflint/install
|
define Package/mstflint/install
|
||||||
$(INSTALL_DIR) $(1)/usr/bin
|
$(INSTALL_DIR) $(1)/usr/bin
|
||||||
$(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/* $(1)/usr/bin/
|
$(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/mstarchive $(1)/usr/bin/
|
||||||
|
$(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/mstconfig $(1)/usr/bin/
|
||||||
$(INSTALL_DIR) $(1)/usr/lib/mstflint
|
$(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/mstcongestion $(1)/usr/bin/
|
||||||
$(CP) $(PKG_INSTALL_DIR)/usr/lib/mstflint $(1)/usr/lib/
|
$(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/mstflint $(1)/usr/bin/
|
||||||
|
$(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/mstfwmanager $(1)/usr/bin/
|
||||||
|
$(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/mstmcra $(1)/usr/bin/
|
||||||
|
$(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/mstmread $(1)/usr/bin/
|
||||||
|
$(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/mstmtserver $(1)/usr/bin/
|
||||||
|
$(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/mstmwrite $(1)/usr/bin/
|
||||||
|
$(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/mstregdump $(1)/usr/bin/
|
||||||
|
$(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/mstvpd $(1)/usr/bin/
|
||||||
|
|
||||||
$(INSTALL_DIR) $(1)/usr/share/mstflint
|
$(INSTALL_DIR) $(1)/usr/share/mstflint
|
||||||
$(CP) $(PKG_INSTALL_DIR)/usr/share/mstflint $(1)/usr/share/
|
$(CP) $(PKG_INSTALL_DIR)/usr/share/mstflint $(1)/usr/share/
|
||||||
|
|
||||||
|
ifeq ($(CONFIG_PACKAGE_MSTFLINT_INCLUDE_PYTHON),y)
|
||||||
|
$(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/mstfwreset $(1)/usr/bin/
|
||||||
|
$(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/mstfwtrace $(1)/usr/bin/
|
||||||
|
$(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/mstprivhost $(1)/usr/bin/
|
||||||
|
$(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/mstresourcedump $(1)/usr/bin/
|
||||||
|
$(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/mstresourceparse $(1)/usr/bin/
|
||||||
|
|
||||||
|
$(INSTALL_DIR) $(1)/usr/lib/mstflint
|
||||||
|
$(CP) $(PKG_INSTALL_DIR)/usr/lib/mstflint/python_tools $(1)/usr/lib/mstflint/
|
||||||
|
$(CP) $(PKG_INSTALL_DIR)/usr/lib/mstflint/sdk $(1)/usr/lib/mstflint/
|
||||||
|
endif
|
||||||
endef
|
endef
|
||||||
|
|
||||||
$(eval $(call BuildPackage,mstflint))
|
$(eval $(call BuildPackage,mstflint))
|
||||||
|
|||||||
Reference in New Issue
Block a user