aboutsummaryrefslogtreecommitdiffstats
path: root/community/py-opengl/APKBUILD
blob: a6b8e08c59f393df6eb8f3e307600437df640815 (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
# Contributor: Leo <thinkabit.ukim@gmail.com>
# Contributor: Francesco Colista <fcolista@alpinelinux.org>
# Maintainer: Francesco Colista <fcolista@alpinelinux.org>
pkgname=py-opengl
_pkgname=PyOpenGL
pkgver=3.1.3b2
pkgrel=1
pkgdesc="Standard OpenGL bindings"
url="http://pyopengl.sourceforge.net"
options="!check"
arch="noarch"
license="BSD-3-Clause"
makedepends="py3-setuptools py-setuptools"
subpackages="
	py3-opengl:_py3:noarch
	py2-opengl:_py2:noarch"
source="https://files.pythonhosted.org/packages/source/P/PyOpenGL/$_pkgname-$pkgver.tar.gz"

builddir="$srcdir"/$_pkgname-$pkgver

build() {
	python2 setup.py build
	python3 setup.py build
}

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

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

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

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

_py3() {
	_py python3
}

sha512sums="bc21e68ec6956b648725ac2db71435eb9cbe9925e52a5215dd553e2c933063f57e1ee44a48818b973be29160a00b03247c5e2157cf67e06b0d854d3dac369e80  PyOpenGL-3.1.3b2.tar.gz"