|
| 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.2.0 |
| 12 | +PKG_RELEASE:=3 |
| 13 | +PKG_LICENSE:=LGPL-2.1 |
| 14 | + |
| 15 | +PYPI_NAME:=chardet |
| 16 | +PKG_HASH:=1b3b6ff479a8c414bc3fa2c0852995695c4a026dcd6d0633b2dd092ca39c1cf7 |
| 17 | + |
| 18 | +HOST_BUILD_DEPENDS:= \ |
| 19 | + python3/host \ |
| 20 | + python-build/host \ |
| 21 | + python-installer/host \ |
| 22 | + python-wheel/host \ |
| 23 | + python-setuptools/host |
| 24 | + |
| 25 | +include $(TOPDIR)/feeds/packages/lang/python/pypi.mk |
| 26 | +include $(INCLUDE_DIR)/package.mk |
| 27 | +include $(INCLUDE_DIR)/host-build.mk |
| 28 | +include $(TOPDIR)/feeds/packages/lang/python/python3-package.mk |
| 29 | +include $(TOPDIR)/feeds/packages/lang/python/python3-host-build.mk |
| 30 | + |
| 31 | +define Package/python3-chardet |
| 32 | + SUBMENU:=Python |
| 33 | + SECTION:=lang |
| 34 | + CATEGORY:=Languages |
| 35 | + MAINTAINER:=Alexandru Ardelean <ardeleanalex@gmail.com> |
| 36 | + URL:=https://github.com/chardet/chardet |
| 37 | + TITLE:=Universal encoding detector |
| 38 | + DEPENDS:=+python3-light +python3-logging |
| 39 | +endef |
| 40 | + |
| 41 | +define Package/python3-chardet/description |
| 42 | + Universal encoding detector for Python |
| 43 | +endef |
| 44 | + |
| 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 | + $(LN) $$$${bin##*/}3 $$$$bin ; \ |
| 51 | + done |
| 52 | +endef |
| 53 | + |
| 54 | +$(eval $(call Py3Package,python3-chardet)) |
| 55 | +$(eval $(call BuildPackage,python3-chardet)) |
| 56 | +$(eval $(call BuildPackage,python3-chardet-src)) |
| 57 | +$(eval $(call HostBuild)) |
0 commit comments