You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

70 lines
2.0 KiB

  1. #
  2. # This is free software, licensed under the GNU General Public License v2.
  3. # See /LICENSE for more information.
  4. #
  5. include $(TOPDIR)/rules.mk
  6. PKG_NAME:=python-defusedxml
  7. PKG_VERSION:=0.6.0
  8. PKG_RELEASE:=2
  9. PKG_MAINTAINER:=Eneas U de Queiroz <cote2004-github@yahoo.com>
  10. PKG_LICENSE:=Python-2.0
  11. PKG_LICENSE_FILES:=LICENSE
  12. PKG_SOURCE:=defusedxml-$(PKG_VERSION).tar.gz
  13. PKG_SOURCE_URL:=https://files.pythonhosted.org/packages/source/d/defusedxml
  14. PKG_HASH:=f684034d135af4c6cbb949b8a4d2ed61634515257a67299e5f940fbaa34377f5
  15. PKG_BUILD_DIR:=$(BUILD_DIR)/$(BUILD_VARIANT)-defusedxml-$(PKG_VERSION)
  16. include $(INCLUDE_DIR)/package.mk
  17. include ../python-package.mk
  18. include ../python3-package.mk
  19. PKG_UNPACK:=$(HOST_TAR) -C $(PKG_BUILD_DIR) --strip-components=1 -xzf $(DL_DIR)/$(PKG_SOURCE)
  20. define Package/python-defusedxml/Default
  21. SUBMENU:=Python
  22. SECTION:=lang
  23. CATEGORY:=Languages
  24. TITLE:=XML bomb protection for Python
  25. URL:=https://github.com/tiran/defusedxml
  26. endef
  27. define Package/python-defusedxml
  28. $(call Package/python-defusedxml/Default)
  29. DEPENDS:= \
  30. +PACKAGE_python-defusedxml:python-light \
  31. +PACKAGE_python-defusedxml:python-codecs \
  32. +PACKAGE_python-defusedxml:python-xml
  33. VARIANT:=python
  34. endef
  35. define Package/python3-defusedxml
  36. $(call Package/python-defusedxml/Default)
  37. DEPENDS:= \
  38. +PACKAGE_python3-defusedxml:python3-light \
  39. +PACKAGE_python3-defusedxml:python3-xml
  40. VARIANT:=python3
  41. endef
  42. define Package/python-defusedxml/description
  43. The defusedxml package contains several Python-only workarounds and fixes for
  44. denial of service and other vulnerabilities in Python’s XML libraries.
  45. endef
  46. define Package/python3-defusedxml/description
  47. $(call Package/python-defusedxml/description)
  48. .
  49. (Variant for Python3)
  50. endef
  51. $(eval $(call PyPackage,python-defusedxml))
  52. $(eval $(call BuildPackage,python-defusedxml))
  53. $(eval $(call BuildPackage,python-defusedxml-src))
  54. $(eval $(call Py3Package,python3-defusedxml))
  55. $(eval $(call BuildPackage,python3-defusedxml))
  56. $(eval $(call BuildPackage,python3-defusedxml-src))