summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: 1d4c1a993e54e1010cdf2b58dd2b9bb3f0a92fcf (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
# Maintainer: Chocobo1 <chocobo1 AT archlinux DOT net>

pkgname=hdf5-git
pkgver=r38283.g66bcfd97a8
pkgrel=1
pkgdesc="General purpose library and file format for storing scientific data"
arch=('i686' 'x86_64')
url="https://www.hdfgroup.org/solutions/hdf5/"
license=('custom')
depends=('glibc' 'bash' 'libaec' 'zlib')
makedepends=('git' 'cmake')  # gcc-fortran
provides=('hdf5')
conflicts=('hdf5')
options=('staticlibs')
source=("git+https://github.com/HDFGroup/hdf5.git")
sha256sums=('SKIP')


pkgver() {
  cd "hdf5"

  _rev=$(git rev-list --count --all)
  _hash=$(git rev-parse --short HEAD)
  printf "r%s.g%s" "$_rev" "$_hash"
}

build() {
  cd "hdf5"

  cmake \
    -B "_build" \
    -DCMAKE_BUILD_TYPE=Release \
    -DCMAKE_INSTALL_PREFIX="/usr" \
    -DCMAKE_INSTALL_LIBDIR="lib" \
    -DHDF5_BUILD_FORTRAN=OFF \
    -DHDF5_ENABLE_Z_LIB_SUPPORT=ON \
    -DHDF5_ENABLE_SZIP_SUPPORT=ON \
    -DHDF5_ENABLE_SZIP_ENCODING=ON \
    ./
  make -C "_build"
}

check() {
  cd "hdf5"

  make -C "_build" test
}

package() {
  cd "hdf5"

  make -C "_build" DESTDIR="$pkgdir" install
  install -Dm644 "COPYING" -t "$pkgdir/usr/share/licenses/hdf5"
}