Date: Thursday, December 19, 2013 @ 12:13:49 Author: fyan Revision: 202203
upgpkg: python-chardet 2.2.1-1 Modified: python-chardet/trunk/PKGBUILD ----------+ PKGBUILD | 31 ++++++++++++++++++++----------- 1 file changed, 20 insertions(+), 11 deletions(-) Modified: PKGBUILD =================================================================== --- PKGBUILD 2013-12-19 10:41:19 UTC (rev 202202) +++ PKGBUILD 2013-12-19 11:13:49 UTC (rev 202203) @@ -1,25 +1,31 @@ # $Id$ -# Maintainer : Ionut Biru <ib...@archlinux.org> +# Maintainer : Felix Yan <felixonm...@gmail.com> +# Contributor: Ionut Biru <ib...@archlinux.org> # Contributor: William Rea <sillywi...@gmail.com> + pkgbase=python-chardet pkgname=('python-chardet' 'python2-chardet') -pkgver=2.0.1 -pkgrel=6 +pkgver=2.2.1 +pkgrel=1 arch=('any') -url="https://github.com/erikrose/chardet" +url="https://github.com/chardet/chardet" license=('LGPL') -makedepends=('python' 'python2') +makedepends=('python-setuptools' 'python2-setuptools') #source=(http://chardet.feedparser.org/download/python2-chardet-${pkgver}.tgz # http://chardet.feedparser.org/download/python3-chardet-${pkgver}.tgz) -source=(ftp://ftp.archlinux.org/other/$pkgbase/python2-chardet-${pkgver}.tgz - ftp://ftp.archlinux.org/other/$pkgbase/python3-chardet-${pkgver}.tgz) -sha256sums=('56fa0c37189b0a5f082d064dec59d69a044aaa3eeb7acb9b3081e2ba306deaa4' - '2b9a1e6a4e719ae3a3e19ccfe0b88cf2c74f3083c36ecac7451a64428a60a1af') +#source=(ftp://ftp.archlinux.org/other/$pkgbase/python2-chardet-${pkgver}.tgz +# ftp://ftp.archlinux.org/other/$pkgbase/python3-chardet-${pkgver}.tgz) +source=("https://pypi.python.org/packages/source/c/chardet/chardet-${pkgver}.tar.gz") +md5sums=('4a758402eaefd0331bdedc7ecb6f452c') +prepare() { + cp -r chardet-${pkgver} python2-chardet-${pkgver} +} + package_python-chardet() { depends=('python>=3.3') pkgdesc="Python3 module for character encoding auto-detection" - cd "${srcdir}/python3-chardet-${pkgver}" + cd chardet-${pkgver} python setup.py install --root="${pkgdir}" --optimize=1 } @@ -26,6 +32,9 @@ package_python2-chardet() { depends=('python2>=2.7.1') pkgdesc="Python2 module for character encoding auto-detection" - cd "${srcdir}/python2-chardet-${pkgver}" + 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" }