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.

47 lines
1.1 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:=4.0.0
  10. PKG_RELEASE:=1
  11. PKG_LICENSE:=LGPL-2.1
  12. PYPI_NAME:=chardet
  13. PKG_HASH:=0d6f53a15db4120f2b08c94f11e7d93d2c911ee118b6b30a04ec3ee8310179fa
  14. include ../pypi.mk
  15. include $(INCLUDE_DIR)/package.mk
  16. include ../python3-package.mk
  17. define Package/python3-chardet
  18. SUBMENU:=Python
  19. SECTION:=lang
  20. CATEGORY:=Languages
  21. MAINTAINER:=Alexandru Ardelean <ardeleanalex@gmail.com>
  22. URL:=https://github.com/chardet/chardet
  23. TITLE:=Universal encoding detector
  24. DEPENDS:=+python3-light
  25. endef
  26. define Package/python3-chardet/description
  27. Universal encoding detector for Python 2 and 3
  28. endef
  29. define Py3Package/python3-chardet/install
  30. $(INSTALL_DIR) $(1)/usr/bin
  31. $(CP) $(PKG_INSTALL_DIR)/usr/bin/* $(1)/usr/bin/
  32. for bin in $(1)/usr/bin/*; do \
  33. mv $$$$bin $$$${bin}3 ; \
  34. $(LN) $$$${bin##*/}3 $$$$bin ; \
  35. done
  36. endef
  37. $(eval $(call Py3Package,python3-chardet))
  38. $(eval $(call BuildPackage,python3-chardet))
  39. $(eval $(call BuildPackage,python3-chardet-src))