summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: 8a24d3e228bdf1e996d8ad5b9dc12d9e9316ab80 (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
# Maintainer: Michael Migliore <mcmigliore+aur@gmail.com>
# Maintainer: Mathieu Wespthal <mathieu.westphal+aur@gmail.com>

export GIT_LFS_SKIP_SMUDGE=1
_name=f3d
pkgname=$_name-core-git
pkgver=nightly.r4.gb0f4b37f
pkgrel=1
pkgdesc='A fast and minimalist 3D viewer'
arch=('x86_64')
url="https://github.com/$_name-app/$_name"
license=('BSD')
depends=('vtk' 'glew' 'netcdf' 'ospray' 'python' 'fmt')
makedepends=('git' 'git-lfs' 'cmake' 'help2man' 'pybind11' 'jdk-openjdk' 'nlohmann-json')
provides=('f3d' 'f3d-core')
conflicts=('f3d' 'f3d-core')
source=("git+https://github.com/$_name-app/$_name.git")
sha256sums=('SKIP')

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

build() {
  cd "$srcdir/$_name"
  mkdir -p build
  cd build
  cmake -DCMAKE_INSTALL_PREFIX=/usr \
        -DCMAKE_BUILD_TYPE=Release \
        -DF3D_BINDINGS_JAVA=ON \
        -DF3D_BINDINGS_PYTHON=ON \
        -DF3D_LINUX_GENERATE_MAN=ON \
        -DF3D_MODULE_EXTERNAL_RENDERING=ON \
        -DF3D_MODULE_RAYTRACING=ON \
        -DF3D_PLUGINS_STATIC_BUILD=OFF \
        ..
  cmake --build .
}

package() {
  cd "$srcdir/$_name/build"
  DESTDIR="$pkgdir" cmake --install .
  DESTDIR="$pkgdir" cmake --install . --component mimetypes
  DESTDIR="$pkgdir" cmake --install . --component sdk
  DESTDIR="$pkgdir" cmake --install . --component configuration
}