blob: 33739a50a9cf5d8f08a994b3ec6956b5175f59df (
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
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
|
# SPDX-License-Identifier: AGPL-3.0
# Maintainer: Matt Quintanilla <matt @ matt quintanilla . xyz>
# Contributor: Oskar Roesler <oskar at oskar-roesler dot de>
_pkg="pycparser"
pkgname="${_pkg}"
pkgver=2.21
pkgrel=2
_py="python2"
pkgname="${_py}-${_pkg}"
_pkgdesc=(
'C parser and AST generator'
'written in Python'
)
pkgdesc="${_pkgdesc[*]}"
_ns="eliben"
_http="https://github.com"
url="${_http}/${_ns}/${_pkg}"
depends=(
"${_py}-ply"
)
makedepends=(
"${_py}-setuptools"
)
arch=(
'any'
)
license=(
'BSD'
)
source=(
"$pkgname-$pkgver.tar.gz::${url}/archive/release_v${pkgver}.tar.gz"
)
sha512sums=(
'b141e14040774ddaae6cd1726b0b2a61bfa76e8bcb5dc25dd99a303c48c7257dd7214cc7704234b0045ccc6a47354f6a7639647d875e1266846659217cc6ea78'
)
build() {
cd \
"${srcdir}/pycparser-release_v${pkgver}"
"${_py}" \
setup.py \
build
cd \
"${_pkg}"
"${_py}" \
_build_tables.py
}
check() {
cd \
"${srcdir}/${_pkg}-release_v${pkgver}"
"${_py}" \
-m unittest \
discover
}
package() {
cd \
"${_pkg}-release_v${pkgver}"
"${_py}" \
setup.py \
install \
--root="${pkgdir}" \
--optimize=1
install \
-Dm644 \
LICENSE \
"${pkgdir}/usr/share/licenses/${pkgname}/LICENSE"
}
# vim:set sw=2 sts=-1 et:
|