aboutsummaryrefslogtreecommitdiffstats
path: root/testing/py-compdb/APKBUILD
blob: ff54765a186b24ebc8a1c508efa78c3e9ec988b4 (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
# Contributor: Orson Teodoro <orsonteodoro@hotmail.com>
# Maintainer: Orson Teodoro <orsonteodoro@hotmail.com>
pkgname=py-compdb
_pkgname=${pkgname#py-*}
pkgver=0_git20180122
pkgrel=0
pkgdesc="The compilation database Swiss army knife"
url="https://github.com/Sarcasm/compdb"
arch="noarch"
license="MIT"
makedepends="python3-dev py-setuptools"
subpackages="$pkgname-doc py3-${pkgname#py-}:py3 py2-${pkgname#py-}:py2"
options="!check"
_gitrev="7a77fec75c8c562ef6c5046e6b0fe9f944ad5e38"
source="$pkgname-$pkgver.zip::https://github.com/Sarcasm/$_pkgname/archive/$_gitrev.zip"
builddir="$srcdir/"$_pkgname-$_gitrev

build() {
	cd "$builddir"
	python2 setup.py build
}

package() {
	cd "$builddir"
	install -d "$pkgdir"/usr/share/doc/$_pkgname/
	install -t "$pkgdir"/usr/share/doc/$_pkgname/ README.rst
}

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

py3() {
	cd "$builddir"
	_py python3
}

py2() {
	cd "$builddir"
	_py python2
}

sha512sums="f7c08559339dca33739f997fec6151e218b9f208a204b60329f8b5250bed4682d085a61b8c8c4745a3e25d65353c6a06ee4b33954e59dedd5e692024e98015aa  py-compdb-0_git20180122.zip"