summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: b6552aa5657b3366aa47b255a16e02848655272f (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
# Author: mosra <mosra@centrum.cz>
pkgname=magnum-bindings-git
pkgver=2019.10.r34.gf2cba9c
pkgrel=1
pkgdesc="Bindings for the Magnum C++11/C++14 graphics engine (Git version)"
arch=('i686' 'x86_64')
url="https://magnum.graphics"
license=('MIT')
depends=('magnum-git' 'python')
makedepends=('cmake' 'git' 'ninja' 'pybind11')
provides=('magnum-bindings')
conflicts=('magnum-bindings')
source=("git+git://github.com/mosra/magnum-bindings.git")
sha1sums=('SKIP')

pkgver() {
    cd "$srcdir/${pkgname%-git}"
    git describe --long | sed -r 's/([^-]*-g)/r\1/;s/-/./g;s/v//g'
}

build() {
    mkdir -p "$srcdir/build"
    cd "$srcdir/build"

    cmake "$srcdir/${pkgname%-git}" \
        -DCMAKE_BUILD_TYPE=Release \
        -DCMAKE_INSTALL_PREFIX=/usr \
        -DWITH_PYTHON=ON \
        -G Ninja
    ninja
}

package() {
    # Helper headers
    cd "$srcdir/build"
    DESTDIR="$pkgdir/" ninja install

    # Native and python packages
    cd "$srcdir/build/src/python"
    python setup.py install --root="$pkgdir" --prefix=/usr
}