aboutsummaryrefslogtreecommitdiffstats
path: root/main/py-cliapp/APKBUILD
blob: f4dd4c2d519a14261f2adf44371d2aa1f4952c1e (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
# Maintainer:
pkgname=py-cliapp
_pkgname=${pkgname#py-}
pkgver=1.20170823
pkgrel=0
pkgdesc="Framework for Unix-like command line programs"
url="http://liw.fi/cliapp"
arch="noarch"
license="GPL-2.0-or-later"
depends="python2 python3"
makedepends="py-setuptools py-yaml"
subpackages="$pkgname-doc py2-$_pkgname:_py2 py3-$_pkgname:_py3"
source="http://code.liw.fi/debian/pool/main/p/python-${_pkgname}/python-${_pkgname}_$pkgver.orig.tar.xz"
builddir="$srcdir/python-$_pkgname-$pkgver"

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

package() {
	mkdir -p "$pkgdir" \
		"$startdir/pkg/$pkgname-doc/usr"
}

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

_py3() {
	_py python3
	mv "$subpkgdir"/usr/share "$startdir/pkg/$pkgname-doc/usr"
}

_py() {
	local python="$1"
	pkgdesc="$pkgdesc (for $python)"
	depends="$depends $python"
	install_if="$pkgname=$pkgver-r$pkgrel $python"

	cd "$builddir"
	$python setup.py install --prefix=/usr --root="$subpkgdir"
}

sha512sums="2b42cd981633791c98c33c968169c4d8bdf0448cc73872d4173e756b7aa390eee46c04c55e87675d27b4aae9e77613cbc574ecb2c0924c549a977aed60ff1924  python-cliapp_1.20170823.orig.tar.xz"