summaryrefslogtreecommitdiff
path: root/pcr/python2-sfml2/PKGBUILD
blob: ed5249a254c8fe79f530df6bac67294c46aef24c (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
# Maintainer: Jorge Araya Navarro <jorgean@lavabit.com>
pkgname=python2-sfml2
pkgver=master
pkgrel=0
pkgdesc="Python 2 binding for SFML 2, written with Cython."
arch=('i686' 'x86_64')
url="http://python-sfml.org"
license=('LGPL3')
depends=('sfml' 'python2')
makedepends=('sfml' 'cython2')
conflicts=('python2-pysfml2' 'python2-pysfml2-git' 'python2-sfml2')
source=('https://github.com/Sonkun/python-sfml/archive/master.zip')
optdepends=('pyqt-common: To use pysfml with Qt')

build() {
    cd "$srcdir/python-sfml-$pkgver"
    python2 setup.py build
}

package() {
    cd "$srcdir/python-sfml-$pkgver"
    python2 setup.py install --root="${pkgdir}" --prefix=/usr

    # Copying the examples
    install -d -m755 "${pkgdir}/usr/lib/python2.7/site-packages/sfml/examples"

    cp -R examples/spacial_music "${pkgdir}/usr/lib/python2.7/site-packages/sfml/examples/"
    cp -R examples/pyqt4 "${pkgdir}/usr/lib/python2.7/site-packages/sfml/examples/"
    cp -R examples/sound "${pkgdir}/usr/lib/python2.7/site-packages/sfml/examples/"

    find "${pkgdir}/usr/lib/python2.7/site-packages/sfml/examples/" -iname "*.*" -exec chmod 644 {} +;

    # Copying the License file
    LICENSEFILE="${pkgdir}/usr/share/licenses/${pkgname}/LICENSE"
    if [ ! -e $LICENSEFILE ]
    then
        install -D -m644 "$srcdir/python-sfml-$pkgver/COPYING" $LICENSEFILE
    fi
}
sha256sums=('01bb4a07c3100807163cd2ddcb1208794b1dbac19706eabea430e23fbf00414b')