summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: efa5d469e8b1eb76256fb595722a4e2ae3fa3eac (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
pkgname=mingw-w64-sz
pkgver=2.1.12
pkgrel=1
pkgdesc="Modular parametrizable lossy compressor framework for scientific data (mingw-w64)"
url="https://szcompressor.org"
license=(BSD)
arch=('any')
depends=('mingw-w64-zstd')
makedepends=('mingw-w64-cmake')
options=('!buildflags' '!strip' 'staticlibs')
source=("https://github.com/szcompressor/SZ/archive/v${pkgver}.tar.gz")
sha256sums=('3712b2cd7170d1511569e48a208f02dfb72ecd7ad053c321e2880b9083e150de')

_architectures="i686-w64-mingw32 x86_64-w64-mingw32"

build() {
  cd "$srcdir/SZ-${pkgver}"
  for _arch in ${_architectures}; do
    mkdir -p build-${_arch} && pushd build-${_arch}
    ${_arch}-cmake -DBUILD_FORTRAN=ON ..
    make
    popd
  done
}

package() {
  for _arch in ${_architectures}; do
    cd "$srcdir/SZ-${pkgver}/build-${_arch}"
    make install DESTDIR="$pkgdir"
    rm "$pkgdir"/usr/${_arch}/bin/*.exe
    ${_arch}-strip --strip-unneeded "$pkgdir"/usr/${_arch}/bin/*.dll
    ${_arch}-strip -g "$pkgdir"/usr/${_arch}/lib/*.a
  done
}