|
| 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 | + |
| 8 | +include $(TOPDIR)/rules.mk |
| 9 | + |
| 10 | +PKG_NAME:=python-chardet |
| 11 | +PKG_VERSION:=5.1.0 |
| 12 | +PKG_RELEASE:=2 |
| 13 | +PKG_LICENSE:=LGPL-2.1 |
| 14 | + |
| 15 | +PYPI_NAME:=chardet |
| 16 | +PKG_HASH:=0d62712b956bc154f85fb0a266e2a3c5913c2967e00348701b32411d6def31e5 |
| 17 | + |
| 18 | +HOST_BUILD_DEPENDS:=python3/host python-build/host python-installer/host python-wheel/host python-setuptools/host |
| 19 | +PKG_BUILD_DEPENDS:=python-setuptools/host |
| 20 | + |
| 21 | +include $(TOPDIR)/feeds/packages/lang/python/pypi.mk |
| 22 | +include $(INCLUDE_DIR)/package.mk |
| 23 | +include $(INCLUDE_DIR)/host-build.mk |
| 24 | +include $(TOPDIR)/feeds/packages/lang/python/python3-package.mk |
| 25 | +include $(TOPDIR)/feeds/packages/lang/python/python3-host-build.mk |
| 26 | + |
| 27 | +define Package/python3-chardet |
| 28 | + SUBMENU:=Python |
| 29 | + SECTION:=lang |
| 30 | + CATEGORY:=Languages |
| 31 | + MAINTAINER:=Alexandru Ardelean <ardeleanalex@gmail.com> |
| 32 | + URL:=https://github.com/chardet/chardet |
| 33 | + TITLE:=Universal encoding detector |
| 34 | + DEPENDS:=+python3-light +python3-logging |
| 35 | +endef |
| 36 | + |
| 37 | +define Package/python3-chardet/description |
| 38 | + Universal encoding detector for Python 2 and 3 |
| 39 | +endef |
| 40 | + |
| 41 | +define Py3Package/python3-chardet/install |
| 42 | + $(INSTALL_DIR) $(1)/usr/bin |
| 43 | + $(CP) $(PKG_INSTALL_DIR)/usr/bin/* $(1)/usr/bin/ |
| 44 | + for bin in $(1)/usr/bin/*; do \ |
| 45 | + mv $$$$bin $$$${bin}3 ; \ |
| 46 | + $(LN) $$$${bin##*/}3 $$$$bin ; \ |
| 47 | + done |
| 48 | +endef |
| 49 | + |
| 50 | +$(eval $(call Py3Package,python3-chardet)) |
| 51 | +$(eval $(call BuildPackage,python3-chardet)) |
| 52 | +$(eval $(call BuildPackage,python3-chardet-src)) |
| 53 | +$(eval $(call HostBuild)) |
0 commit comments