archrelease: copy trunk to community-any
[ArchLinux/community.git] / netcdf / repos / community-x86_64 / PKGBUILD
blobf95f5189fcd763193b31a26900b0c84bcc7055ce
1 # Maintainer: Ronald van Haren <ronald.archlinux.org>
2 # Maintainer: Bruno Pagani <archange@archlinux.org>
3 # Contributor: damir <damir@archlinux.org>
5 pkgname=netcdf
6 pkgver=4.9.2
7 pkgrel=2
8 pkgdesc="network Common Data Form interface for array-oriented data access and corresponding library"
9 arch=(x86_64)
10 url="https://www.unidata.ucar.edu/software/netcdf/"
11 depends=(hdf5 curl libxml2 libaec blosc bzip2 libzip zstd)
12 makedepends=(cmake)
13 checkdepends=(unzip)
14 optdepends=('netcdf-fortran: fortran bindings' 'netcdf-cxx: c++ bindings')
15 options=(!makeflags)
16 license=(custom)
17 source=(https://github.com/Unidata/netcdf-c/archive/v${pkgver}/${pkgname}-${pkgver}.tar.gz)
18 sha256sums=('bc104d101278c68b303359b3dc4192f81592ae8640f1aee486921138f7f88cb7')
20 prepare() {
21   # https://github.com/Unidata/netcdf-c/issues/2188 https://github.com/Unidata/netcdf-c/issues/2242
22   sed -i "/tst_remote3/d" ${pkgname}-c-${pkgver}/ncdap_test/CMakeLists.txt
25 build() {
26   cmake -B build -S ${pkgname}-c-${pkgver} \
27     -DCMAKE_INSTALL_PREFIX=/usr \
28     -DCMAKE_INSTALL_LIBDIR=lib \
29     -DCMAKE_BUILD_TYPE=Release \
30     -DENABLE_BYTERANGE=ON \
31     -DENABLE_CDF5=ON \
32     -DENABLE_DAP_LONG_TESTS=ON \
33     -DENABLE_DAP_REMOTE_TESTS=ON \
34     -DENABLE_EXAMPLE_TESTS=ON \
35     -DENABLE_EXTRA_TESTS=ON \
36     -DENABLE_FILTER_TESTING=ON \
37     -DENABLE_LARGE_FILE_TESTS=ON \
38     -DENABLE_UNIT_TESTS=ON
39   make -C build
42 check() {
43   make -C build test
46 package() {
47   make -C build DESTDIR="${pkgdir}" install
48   install -Dm644 ${pkgname}-c-${pkgver}/COPYRIGHT -t "${pkgdir}"/usr/share/licenses/${pkgname}/