{% set version = "1.21.0" %}

package:
  name: blosc
  version: {{ version }}

source:
  url: https://github.com/Blosc/c-blosc/archive/v{{ version }}.tar.gz
  sha256: b0ef4fda82a1d9cbd11e0f4b9685abf14372db51703c595ecd4d76001a8b342d

build:
  number: 0
  run_exports:
    - {{ pin_subpackage('blosc') }}

requirements:
  build:
    - cmake
    - make  # [unix]
    - {{ compiler('c') }}
    - {{ compiler('cxx') }}
  host:

test:
  commands:
    - test -e $PREFIX/include/blosc.h                    # [unix]
    - test -e $PREFIX/include/blosc-export.h             # [unix]
    - test -e $PREFIX/lib/libblosc.a                     # [unix]
    - test -e $PREFIX/lib/libblosc${SHLIB_EXT}           # [unix]
    - if not exist %LIBRARY_INC%\\blosc.h exit 1         # [win]
    - if not exist %LIBRARY_INC%\\blosc-export.h exit 1  # [win]
    - if not exist %LIBRARY_BIN%\\blosc.dll exit 1       # [win]
    - if not exist %LIBRARY_LIB%\\blosc.lib exit 1       # [win]
    - if not exist %LIBRARY_LIB%\\libblosc.lib exit 1    # [win]

about:
  home: https://github.com/Blosc/c-blosc
  license: BSD-3-Clause
  license_file: LICENSES/BLOSC.txt
  summary: A blocking, shuffling and loss-less compression library that can be faster than `memcpy()`

extra:
  recipe-maintainers:
    - danielfrg
    - FrancescElies
    - jakirkham
    - beckermr
