summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: e4e1848aeed69f61d0649e44fdc1a7c4d5f3d7f1 (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
# Maintainer: Michael Migliore <mcmigliore+aur@gmail.com>

pkgname=f3d-git
pkgver=0.1.ed9b979
pkgrel=3
pkgdesc='A fast and minimalist 3D viewer'
arch=('x86_64')
url="https://gitlab.kitware.com/f3d/f3d"
license=('BSD')
depends=('vtk-raytracing-git')
makedepends=('cmake')
provides=('f3d')

prepare() {
    cd "${srcdir}"
    git clone ${url}.git f3d 2> /dev/null || git -C f3d pull
}

pkgver() {
    cd "${srcdir}/f3d"
    echo "0.1.$(git rev-parse --short HEAD)"
}

build() {
    cd "${srcdir}/f3d"
    mkdir -p build && cd build
    cmake -DCMAKE_INSTALL_PREFIX=/usr \
          -DCMAKE_BUILD_TYPE=Release \
          -DBUILD_TESTING=OFF \
          -DF3D_INSTALL_DEFAULT_CONFIGURATION_FILE=ON \
          ..
    make
}

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

    install -dv "${pkgdir}"/usr/share/licenses/f3d
    mv "${pkgdir}"/usr/share/doc/f3d/LICENSE "${pkgdir}"/usr/share/licenses/f3d

    install -dv "${pkgdir}"/usr/share/doc/f3d
}