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.

53 lines
1.3 KiB

  1. #
  2. # Copyright (C) 2007-2017 OpenWrt.org
  3. #
  4. # This is free software, licensed under the GNU General Public License v2.
  5. # See /LICENSE for more information.
  6. #
  7. include $(TOPDIR)/rules.mk
  8. PKG_NAME:=python-chardet
  9. PKG_VERSION:=3.0.4
  10. PKG_RELEASE:=2
  11. PKG_LICENSE:=LGPL-2.1
  12. PYPI_NAME:=chardet
  13. PKG_HASH:=84ab92ed1c4d4f16916e05906b6b75a6c0fb5db821cc65e70cbd64a3e2a5eaae
  14. include ../pypi.mk
  15. include $(INCLUDE_DIR)/package.mk
  16. include ../python3-package.mk
  17. define Package/python-chardet/Default
  18. SUBMENU:=Python
  19. SECTION:=lang
  20. CATEGORY:=Languages
  21. MAINTAINER:=Alexandru Ardelean <ardeleanalex@gmail.com>
  22. URL:=https://github.com/chardet/chardet
  23. endef
  24. define Package/python3-chardet
  25. $(call Package/python-chardet/Default)
  26. TITLE:=Universal encoding detector for Python3
  27. DEPENDS:=+PACKAGE_python3-chardet:python3-light
  28. VARIANT:=python3
  29. endef
  30. define Package/python3-chardet/description
  31. Universal encoding detector for Python 2 and 3
  32. .
  33. (Variant for Python3)
  34. endef
  35. define Py3Package/python3-chardet/install
  36. $(INSTALL_DIR) $(1)/usr/bin
  37. $(CP) $(PKG_INSTALL_DIR)/usr/bin/* $(1)/usr/bin/
  38. for bin in $(1)/usr/bin/*; do \
  39. mv $$$$bin $$$${bin}3 ; \
  40. done
  41. endef
  42. $(eval $(call Py3Package,python3-chardet))
  43. $(eval $(call BuildPackage,python3-chardet))
  44. $(eval $(call BuildPackage,python3-chardet-src))