summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: b35e6a9004bd48e5eb237144d08a57d110a3ea8b (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
# Maintainer: Patrick Northon <northon_patrick3@yahoo.ca>

_pkgname=python-pygame-sdl2
pkgname=${_pkgname}-git
_dir=pygame_sdl2
pkgver=2.1.0.r451.4fadf87
pkgrel=1
pkgdesc="SDL2-based implementation of the Pygame API"
arch=('i686' 'x86_64' 'aarch64')
url="https://github.com/renpy/$_dir"
license=('LGPL2.1' 'ZLIB')
depends=('python' 'sdl2_image' 'sdl2_mixer' 'sdl2_ttf')
makedepends=('cython0' 'git' 'python-setuptools')
provides=($_pkgname)
conflicts=($_pkgname)
source=("git+$url.git")
b2sums=('SKIP')

pkgver() {
	cd "$_dir"
	version="$(cat 'src/pygame_sdl2/version.py' | grep '^vernum = ' | sed 's/^vernum = //; s/(//; s/)//; s/, /./g')"
	echo "${version}.r$(git rev-list --count HEAD).$(git rev-parse --short HEAD)"
}

build() {
	cd "$_dir"
	python setup.py build
}

package() {
	cd "$_dir"
	python setup.py install --root="$pkgdir" --optimize=1 --skip-build
	install -Dm644 'COPYING.ZLIB' "$pkgdir/usr/share/licenses/$_pkgname/LICENSE.zlib"
}