{% set version = "2.23.1" %}

package:
  name: coda
  version: {{ version }}

source:
  url: https://github.com/stcorp/coda/releases/download/{{ version }}/coda-{{ version }}.tar.gz
  sha256: 04f493df150d0d87f14292f570f45b65801fe80b6aadcdf67c4e38d964ef6f34

build:
  number: 0

requirements:
  build:
    - {{ compiler('c') }}
    - {{ compiler('cxx') }}
    - cmake
    - make  # [not win]
    - bison  # [not win]
    - flex  # [not win]
    - m2-bison  # [win]
    - m2-flex  # [win]

  host:
    - python
    - jpeg
    - zlib
    - hdf4
    - hdf5

  run:
    - python
    - numpy
    - cffi

test:
  commands:
    - test -f $PREFIX/lib/libcoda$SHLIB_EXT  # [unix]
    - if not exist "%LIBRARY_PREFIX%/lib/libcoda.lib" exit 1  # [win]
    - if not exist "%LIBRARY_PREFIX%/bin/codacmp.exe" exit 1  # [win]
  imports:
    - coda

about:
  home: https://github.com/stcorp/coda
  license: BSD-3-Clause-Clear
  license_family: BSD
  license_file: COPYING
  summary: CODA is the Common Data Access framework that allows reading of scientific data from various data formats, including structured ascii, structured binary, XML, netCDF, CDF, HDF4, HDF5, GRIB, RINEX and SP3. It provides a single consistent hierarchical view on data independent of the underlying storage format.

extra:
  recipe-maintainers:
    - srepmub
    - svniemeijer
