summaryrefslogtreecommitdiff
path: root/community/python2-cchardet/PKGBUILD
blob: c9c108873922360ee7af255967166ee121eafced (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
# $Id: PKGBUILD 80426 2012-11-21 14:15:53Z mtorromeo $
# Maintainer: Massimiliano Torromeo <massimiliano.torromeo@gmail.com>

pkgname=python2-cchardet
pkgver=0.3.2
pkgrel=1
_libname=${pkgname/python2-/}
pkgdesc="Universal encoding detector faster than chardet."
url="http://pypi.python.org/pypi/cchardet/"
depends=('python2')
makedepends=('cython2' 'python2-distribute')
license=('MIT')
arch=('i686' 'x86_64')
source=(http://pypi.python.org/packages/source/${_libname:0:1}/$_libname/$_libname-$pkgver.tar.gz)

build() {
    cd "$srcdir/$_libname-$pkgver"
	find -type f -exec sed -i '1 s|python\s*$|python2|' {} +
    python2 setup.py build
}

package() {
    cd "$srcdir/$_libname-$pkgver"
    python2 setup.py install --root="$pkgdir"
	install -m0644 -D "README.rst" "$pkgdir/usr/share/licenses/$pkgname/README.rst"
}

sha256sums=('a3e92811d5a8aacd9ecfdb4ea9637ba801b9b18b7c779dbdf41d07bb48235a23')