mirror of
https://gitdl.cn/https://github.com/chakralinux/desktop.git
synced 2025-01-24 02:22:13 +08:00
38 lines
1.1 KiB
Bash
38 lines
1.1 KiB
Bash
pkgbase=python-chardet
|
|
pkgname=('python2-chardet' 'python3-chardet')
|
|
_pkgname=chardet
|
|
pkgver=3.0.4
|
|
pkgrel=1
|
|
arch=('x86_64')
|
|
#url="http://chardet.feedparser.org"
|
|
url="https://github.com/chardet/chardet"
|
|
license=('LGPL')
|
|
makedepends=('python2-setuptools' 'python3-setuptools')
|
|
source=("https://pypi.io/packages/source/c/chardet/chardet-${pkgver}.tar.gz")
|
|
sha512sums=('61a03b23447a2bfe52ceed4dd1b9afdb5784da1933a623776883ee9f297e341f633e27f0ce0230bd5fdc5fdb5382105ab42736a74a417ddeb9f83af57455dba5')
|
|
|
|
prepare() {
|
|
cp -r chardet-${pkgver} python2-chardet-${pkgver}
|
|
}
|
|
|
|
package_python3-chardet() {
|
|
depends=('python3')
|
|
pkgdesc="Python3 module for character encoding auto-detection"
|
|
|
|
cd chardet-${pkgver}
|
|
python3 setup.py install --root="${pkgdir}" --optimize=1
|
|
}
|
|
|
|
package_python2-chardet() {
|
|
depends=('python2')
|
|
pkgdesc="Python2 module for character encoding auto-detection"
|
|
provides=('python-chardet')
|
|
replaces=('python-chardet')
|
|
|
|
cd python2-chardet-${pkgver}
|
|
python2 setup.py install --root="${pkgdir}" --optimize=1
|
|
|
|
# To avoid file conflict with the python3 version
|
|
mv "$pkgdir/usr/bin/chardetect" "$pkgdir/usr/bin/chardetect-py2"
|
|
}
|