aboutsummaryrefslogtreecommitdiffstats
path: root/community/py-cparser/APKBUILD
blob: 90f3624f80b88015571c9770e7556169f3623adf (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
# Contributor: William Pitcock <nenolod@dereferenced.org>
# Maintainer: William Pitcock <nenolod@dereferenced.org>
pkgname=py-cparser
pkgver=2.14
pkgrel=2
pkgdesc="a C parser written in Python"
url="https://github.com/eliben/pycparser"
arch="noarch"
license="BSD"
depends=""
makedepends="python2-dev python3-dev py-setuptools"
install=""
subpackages="py3-${pkgname/py-/}:_py3 py2-${pkgname/py-/}:_py2"
source="https://files.pythonhosted.org/packages/source/p/pycparser/pycparser-$pkgver.tar.gz"
builddir="$srcdir"/pycparser-$pkgver

build() {
	cd "$builddir"
	python2 setup.py build || return 1
	python3 setup.py build || return 1	
}

package() {
	mkdir -p "$pkgdir"
}

_py() {
	local python=$1
	pkgdesc="$pkgdesc - $python"
	install_if="$pkgname=$pkgver-r$pkgrel $python"	
	cd "$builddir"
	$python setup.py install --prefix=/usr --root="$subpkgdir"
}

_py2() {
	_py python2
	replaces="$pkgname"
}

_py3() {
	_py python3
}

md5sums="a2bc8d28c923b4fe2b2c3b4b51a4f935  pycparser-2.14.tar.gz"
sha256sums="7959b4a74abdc27b312fed1c21e6caf9309ce0b29ea86b591fd2e99ecdf27f73  pycparser-2.14.tar.gz"
sha512sums="d5b9ab434a8944898ac23a4f51189db77b02b993bf3e3ca018852b117fc0eb43e460b156beaa5c1d631ad71c81e1649113e9fff7e33506b1e7d4de24d8b464c6  pycparser-2.14.tar.gz"