summaryrefslogtreecommitdiff
path: root/pcr/renpy-python3/PKGBUILD
blob: 55ae768672576993497fb92786ba330ad993caba (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
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
# $Id: PKGBUILD 161858 2016-02-16 17:48:18Z alucryd $
# Maintainer (Arch): Maxime Gauduin <alucryd@archlinux.org>
# Contributor (Arch): Cravix <dr.neemous@gmail.com>
# Contributor (Arch): AlexanderR <rvacheva@nxt.ru>
# Contributor (Arch): zhn <zhangn1985@gmail.com>
# Maintainer: Márcio Silva <coadde@parabola.nu>

pkgbase=renpy
pkgname=('renpy-python3' 'renpy-python3-demos')
pkgver=6.99.8
pkgrel=3
pkgdesc="The Ren'Py Visual Novel Engine, with Python 3 support"
arch=('i686' 'x86_64' 'armv7h')
url='http://www.renpy.org'
license=('MIT')
depends=('ffmpeg' 'glew' 'python-pygame-sdl2')
makedepends=('cython')
source=("http://www.renpy.org/dl/${pkgver}/renpy-${pkgver}-source.tar.bz2"
        'renpy'
        'renpy.desktop'
        'renpy.png'
        'renpy-ffmpeg30.patch'
        'python3.patch')
sha256sums=('0eb0c763bf7e977db06039c69751f1ed5e69c4b738f7f6d975e99e8729eff58e'
            '993046143826c74f15ad3990d662878952594545eb315e3f1857ffe32e62399b'
            'fccde3461617a098a78d938d9db782d403eda410a84ab52825a597498ab95834'
            '611edc07a40ccb8e04e8858847fc1d2a066d29c2ed54e5b357880a0605818dc5'
            'c2d27a3f6b74f874a790ce6c12e9d4b718784478d8a8aa23c879d186f60a25ab'
            'd3fa4d78ceb52f4ec26bc18e87f94e19bcf579766ef2ffee080d11194f0fb913')

prepare() {
  cd renpy-${pkgver}-source

  patch -Np1 -i ../renpy-ffmpeg30.patch
  patch -Np1 -i ../python3.patch # use "2to3" to convert all .py file to Python 3
}

build() {
  cd renpy-${pkgver}-source

  export RENPY_CYTHON='cython'

  python module/setup.py build
}

package_renpy-python3() {
  optdepends=('renpy-demos: Tutorial and The Question demos'
              'tk: Set projects directory')
  conflicts=('renpy')

  cd renpy-${pkgver}-source

  python module/setup.py install --root="${pkgdir}" --prefix='/usr' --optimize='1'

  install -dm 755 "${pkgdir}"/usr/{bin,share/{applications,pixmaps,renpy,doc}}

  cp -dr --no-preserve='ownership' doc launcher renpy renpy.py templates "${pkgdir}"/usr/share/renpy/
  ln -s /usr/share/renpy/doc "${pkgdir}"/usr/share/doc/renpy

  install -m 755 ../renpy "${pkgdir}"/usr/bin/
  install -m 644 ../renpy.desktop "${pkgdir}"/usr/share/applications/
  install -m 644 ../renpy.png "${pkgdir}"/usr/share/pixmaps/

  install -dm 755 "${pkgdir}"/usr/share/licenses/renpy
  install -m 644 LICENSE.txt "${pkgdir}"/usr/share/licenses/renpy/
}

package_renpy-python3-demos() {
  depends=('renpy-python3')
  conflicts=('renpy-python3-demos')

  cd renpy-${pkgver}-source

  install -dm 755 "${pkgdir}"/usr/share/renpy

  cp -dr --no-preserve='ownership' the_question tutorial "${pkgdir}"/usr/share/renpy/

  install -dm 755 "${pkgdir}"/usr/share/licenses
  ln -s renpy "${pkgdir}"/usr/share/licenses/renpy-demos
}

# vim: ts=2 sw=2 et: