aboutsummaryrefslogtreecommitdiff
path: root/lang/python/python-chardet
diff options
context:
space:
mode:
authorJeffery To <jeffery.to@gmail.com>2019-05-25 04:28:53 +0800
committerJeffery To <jeffery.to@gmail.com>2019-05-25 04:28:53 +0800
commit6bd527df2ed5703eb4dcd3041c7113e9ebdcd2c4 (patch)
tree1fdb0b6a31abfce7a45cadd0e72eab14bca8e024 /lang/python/python-chardet
parentea781a938cc3d4c733dbcc90f0ff5f3b7409679c (diff)
python-chardet: Rename Python 3 script
The Python 2 and 3 versions of chardet both install a script with the same name (/usr/bin/chardetect). This is the issue identified in #9006 (https://github.com/openwrt/packages/pull/9006#issuecomment-493709812). This renames the Python 3 script to chardetect3. Signed-off-by: Jeffery To <jeffery.to@gmail.com>
Diffstat (limited to 'lang/python/python-chardet')
-rw-r--r--lang/python/python-chardet/Makefile10
1 files changed, 9 insertions, 1 deletions
diff --git a/lang/python/python-chardet/Makefile b/lang/python/python-chardet/Makefile
index bce37b3c2..35a181252 100644
--- a/lang/python/python-chardet/Makefile
+++ b/lang/python/python-chardet/Makefile
@@ -9,7 +9,7 @@ include $(TOPDIR)/rules.mk
PKG_NAME:=python-chardet
PKG_VERSION:=3.0.4
-PKG_RELEASE:=1
+PKG_RELEASE:=2
PKG_LICENSE:=LGPL-2.1
PKG_SOURCE:=chardet-$(PKG_VERSION).tar.gz
@@ -55,6 +55,14 @@ $(call Package/python-chardet/description)
(Variant for Python3)
endef
+define Py3Package/python3-chardet/install
+ $(INSTALL_DIR) $(1)/usr/bin
+ $(CP) $(PKG_INSTALL_DIR)/usr/bin/* $(1)/usr/bin/
+ for bin in $(1)/usr/bin/*; do \
+ mv $$$$bin $$$${bin}3 ; \
+ done
+endef
+
$(eval $(call PyPackage,python-chardet))
$(eval $(call BuildPackage,python-chardet))
$(eval $(call BuildPackage,python-chardet-src))