aboutsummaryrefslogtreecommitdiffstats
path: root/testing/py-pymaging-png/APKBUILD
blob: 411dc680d7904829bc63446f8b19a9e08e55e941 (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
# Maintainer: Marian Buschsieweke <marian.buschsieweke@ovgu.de>
pkgname=py-pymaging-png
_pkgname=pymaging-png
_commit=83d85c44e4b2342818e6c068065e031a9f81bb9f
pkgver=0.0.20130727
pkgrel=2
pkgdesc="PNG format support for pymaging"
url="https://github.com/ojii/$_pkgname/"
arch="noarch"
license="MIT custom"
depends=""
makedepends="python2-dev python3-dev py-setuptools"
checkdepends="py-pymaging"
subpackages="py2-${pkgname#py-}:_py2 py3-${pkgname#py-}:_py3"
source="$pkgname-$pkgver.tar.gz::https://github.com/ojii/$_pkgname/archive/$_commit.tar.gz"
builddir="$srcdir"/$_pkgname-$_commit

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

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

_py2() {
	_py python2
	rm -rf "$subpkgdir/usr/bin"
}

_py3() {
	_py python3
}

_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"
}

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

sha512sums="b0860355c66d30d026443f1a360ca639bfd953da2bf00cc2b25902294d23eb07c3dd94a6c08a588fab816a7b92395bf4b65bf7a78c397a4c4811224035f1cb92  py-pymaging-png-0.0.20130727.tar.gz"