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.

69 lines
1.7 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 ../python-package.mk
  17. include ../python3-package.mk
  18. define Package/python-chardet/Default
  19. SUBMENU:=Python
  20. SECTION:=lang
  21. CATEGORY:=Languages
  22. MAINTAINER:=Alexandru Ardelean <ardeleanalex@gmail.com>
  23. URL:=https://github.com/chardet/chardet
  24. endef
  25. define Package/python-chardet
  26. $(call Package/python-chardet/Default)
  27. TITLE:=Universal encoding detector for Python 2
  28. DEPENDS:=+PACKAGE_python-chardet:python
  29. VARIANT:=python
  30. endef
  31. define Package/python3-chardet
  32. $(call Package/python-chardet/Default)
  33. TITLE:=Universal encoding detector for Python3
  34. DEPENDS:=+PACKAGE_python3-chardet:python3-light
  35. VARIANT:=python3
  36. endef
  37. define Package/python-chardet/description
  38. Universal encoding detector for Python 2 and 3
  39. endef
  40. define Package/python3-chardet/description
  41. $(call Package/python-chardet/description)
  42. .
  43. (Variant for Python3)
  44. endef
  45. define Py3Package/python3-chardet/install
  46. $(INSTALL_DIR) $(1)/usr/bin
  47. $(CP) $(PKG_INSTALL_DIR)/usr/bin/* $(1)/usr/bin/
  48. for bin in $(1)/usr/bin/*; do \
  49. mv $$$$bin $$$${bin}3 ; \
  50. done
  51. endef
  52. $(eval $(call PyPackage,python-chardet))
  53. $(eval $(call BuildPackage,python-chardet))
  54. $(eval $(call BuildPackage,python-chardet-src))
  55. $(eval $(call Py3Package,python3-chardet))
  56. $(eval $(call BuildPackage,python3-chardet))
  57. $(eval $(call BuildPackage,python3-chardet-src))