summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: e800990b56b39b70bb2175784741d7d8ee68e698 (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
# Maintainer: Nathan Chere <git at nathanchere dot com dot au>
# Contributor: Alexander Fasching <fasching.a91@gmail.com>
# Contributor: Alexander F. Rødseth <xyproto@archlinux.org>

pkgname=python-pyxel
pkgver=2.3.6
pkgrel=1
pkgdesc='Retro game development environment'
arch=('i686' 'x86_64')
url='https://github.com/kitao/pyxel'
license=('MIT')
depends=('gcc-libs' 'glibc' 'python' 'sdl2')
optdepends=('pyinstaller')
makedepends=('cargo-nightly' 'clang' 'python-build' 'python-installer' 'python-maturin')
source=("pyxel-$pkgver::https://github.com/kitao/pyxel/archive/v$pkgver.tar.gz")
md5sums=('162340488a0ef09681c998d744b853d5')

options=('!debug')

prepare() {
  cd pyxel-$pkgver
  sed -i -e 's-/usr/local/include-/usr/include/SDL2-' rust/pyxel-platform/build.rs
}

build() {
  cd pyxel-$pkgver/python

  export RUSTUP_TOOLCHAIN=nightly
  python -m build --wheel --no-isolation
}

package() {
  cd pyxel-$pkgver/python

  python -m installer --destdir="$pkgdir" dist/*.whl
  install -Dm644 ../LICENSE "$pkgdir/usr/share/licenses/$pkgname/LICENSE"
}

# vim: ts=2 sw=2 et: