aboutsummaryrefslogtreecommitdiffstats
path: root/testing
diff options
context:
space:
mode:
authorOrson Teodoro <orsonteodoro@hotmail.com>2018-01-29 18:43:29 -0800
committerKevin Daudt <kdaudt@alpinelinux.org>2019-03-06 11:30:33 +0000
commit98a48a943043346d0598f90db728ada9ff336010 (patch)
treef4e727dc6f40468892b5fb8382c79523e62acd91 /testing
parent609a768b469014f279b31ef6f6c2e7acd26b85a0 (diff)
downloadaports-98a48a943043346d0598f90db728ada9ff336010.tar.bz2
aports-98a48a943043346d0598f90db728ada9ff336010.tar.xz
testing/py-compdb: new aport
Diffstat (limited to 'testing')
-rw-r--r--testing/py-compdb/APKBUILD48
1 files changed, 48 insertions, 0 deletions
diff --git a/testing/py-compdb/APKBUILD b/testing/py-compdb/APKBUILD
new file mode 100644
index 0000000000..ff54765a18
--- /dev/null
+++ b/testing/py-compdb/APKBUILD
@@ -0,0 +1,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"