summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: 6c1e5f5d39379a635ba8b40fed62e9f5583fdc12 (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
# Author: mosra <mosra@centrum.cz>
pkgname=corrade-git
pkgver=2020.06.r894.gcbcadb57
pkgrel=1
pkgdesc="C++11/C++14 multiplatform utility library (Git version)"
arch=('i686' 'x86_64')
url="https://magnum.graphics/corrade/"
license=('MIT')
makedepends=('cmake' 'git' 'ninja')
provides=('corrade')
conflicts=('corrade')
source=("git+https://github.com/mosra/corrade.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 \
        -G Ninja
    ninja
}

package() {
    cd "$srcdir/build"
    DESTDIR="$pkgdir/" ninja install
}