{% set version = "1.8" %}
{% set sha256 = "50711ad4e9d3862f8dfb11b97eb53631a86ee3ce49c0e68ec2b6d059a9662f61" %}

package:
  name: libdeflate
  version: {{ version }}

source:
  url: https://github.com/ebiggers/libdeflate/archive/v{{ version }}.tar.gz
  sha256: {{ sha256 }}

build:
  number: 0
  run_exports:
    - {{ pin_subpackage('libdeflate', max_pin='x.x') }}

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

test:
  commands:
    - test ! -f ${PREFIX}/lib/libdeflate.a          # [unix]
    - test -f ${PREFIX}/lib/libdeflate${SHLIB_EXT}  # [unix]
    - test -f ${PREFIX}/include/libdeflate.h        # [unix]
    - libdeflate-gzip -h
    - libdeflate-gunzip -h
    - if not exist %LIBRARY_BIN%\\libdeflate.dll exit 1  # [win]
    - if not exist %LIBRARY_LIB%\\libdeflate.lib exit 1  # [win]
    - if not exist %LIBRARY_INC%\\libdeflate.h exit 1    # [win]

about:
  home: https://github.com/ebiggers/libdeflate
  license: MIT
  license_file: COPYING
  summary: libdeflate is a library for fast, whole-buffer DEFLATE-based compression and decompression.

extra:
  recipe-maintainers:
    - dpryan79
    - rhpvorderman
    - hmaarrfk
