summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: 51afe378877513ea2dedd17c2c5ec687b0a9904d (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
48
49
50
51
52
53
54
55
56
pkgname=feelpp
pkgver=0.108.0
pkgrel=1
pkgdesc="Finite Element Embedded Language and Library in C++"
arch=('x86_64')
url="https://github.com/feelpp"
license=('LGPL')
depends=('cln' 'mumps' 'slepc' 'gmsh' 'fftw' 'ann' 'glpk' 'gsl' 'python')
makedepends=('cmake' 'clang' 'eigen')
source=("${pkgname}-${pkgver}::git+https://github.com/feelpp/feelpp.git#tag=v${pkgver}")
sha256sums=('SKIP')

prepare() {
  cd ${pkgname}-${pkgver}
  git submodule init
  git submodule update -f --init
}

build() {
  cd ${pkgname}-${pkgver}
  mkdir -p build && cd build
  cmake \
    -DCMAKE_INSTALL_PREFIX=/usr \
    -DCMAKE_BUILD_TYPE=Release \
    -DCMAKE_INSTALL_LIBDIR=lib \
    -DPETSC_DIR=/opt/petsc/linux-c-opt/ \
    -DSLEPC_DIR=/opt/slepc/linux-c-opt/ \
    -DFEELPP_MINIMAL_CONFIGURATION=ON \
    -DFEELPP_MINIMAL_BUILD=ON \
    -DFEELPP_ENABLE_QUICKSTART=OFF \
    -DFEELPP_ENABLE_PYFEELPP_LIBFEELPP=OFF \
    -DFEELPP_ENABLE_DOCUMENTATION=OFF \
    -DFEELPP_ENABLE_GMSH=ON \
    -DFEELPP_ENABLE_PETSC=ON \
    -DFEELPP_ENABLE_SLEPC=ON \
    -DFEELPP_ENABLE_ANN=ON \
    -DFEELPP_ENABLE_FFTW=ON \
    -DFEELPP_ENABLE_GSL=ON \
    -DFEELPP_ENABLE_SYSTEM_EIGEN3=ON \
    -DCMAKE_C_COMPILER=/usr/bin/clang \
    -DCMAKE_CXX_COMPILER=/usr/bin/clang++ \
    -DBUILD_TESTING=OFF \
    ..
  make
}

package() {
  cd ${pkgname}-${pkgver}/build
  make DESTDIR="$pkgdir" install
  rm "$pkgdir"/usr/bin/{ginsh,gflags_completions.sh}
  rm "$pkgdir"/usr/lib/*.a
  rm "$pkgdir"/usr/lib/libc99snprintf.so
  rm -r "$pkgdir"/usr/doc
  rm -r "$pkgdir"/home
}