archrelease: copy trunk to extra-x86_64
[arch-packages.git] / python-pycparser / trunk / PKGBUILD
blobc713c6cf62a90b569bc6e0d60de0251a3ba73aac
1 # Maintainer: Felix Yan <felixonmars@archlinux.org>
2 # Contributor: Justin Dray <justin@dray.be>
3 # Contributor: Alexander Rødseth <rodseth@gmail.com>
4 # Contributor: lang2 <wenzhi.liang@gmail.com>
6 pkgname=python-pycparser
7 pkgver=2.21
8 pkgrel=3
9 pkgdesc='C parser and AST generator written in Python'
10 url='https://github.com/eliben/pycparser'
11 depends=('python-ply')
12 makedepends=('python-setuptools')
13 arch=('any')
14 license=('BSD')
15 source=("$pkgname-$pkgver.tar.gz::https://github.com/eliben/pycparser/archive/release_v$pkgver.tar.gz")
16 sha512sums=('b141e14040774ddaae6cd1726b0b2a61bfa76e8bcb5dc25dd99a303c48c7257dd7214cc7704234b0045ccc6a47354f6a7639647d875e1266846659217cc6ea78')
18 build() {
19   cd "$srcdir"/pycparser-release_v$pkgver
20   python setup.py build
21   cd pycparser
22   python _build_tables.py
25 check() {
26   cd "$srcdir"/pycparser-release_v$pkgver
27   python -m unittest discover
30 package() {
31   cd pycparser-release_v$pkgver
33   python setup.py install --root="$pkgdir" --optimize=1
34   install -Dm644 LICENSE "$pkgdir"/usr/share/licenses/$pkgname/LICENSE