{% set name = "aws-c-cal" %}
{% set version = "0.5.11" %}

package:
  name: {{ name|lower }}
  version: {{ version }}

source:
  url: https://github.com/awslabs/{{ name }}/archive/v{{ version }}.tar.gz
  sha256: ef46e121b2231a0b19afce8af4b32d77501df4d470e926990918456636cd83c0

build:
  number: 0
  run_exports:
    - {{ pin_subpackage("aws-c-cal", max_pin="x.x.x") }}

requirements:
  build:
    - cmake !=3.19.0,!=3.19.1
    - {{ compiler('c') }}
    - ninja
  host:
    - aws-c-common
    - openssl

test:
  commands:
    - test -f $PREFIX/lib/libaws-c-cal${SHLIB_EXT}  # [unix]
    - test -f $PREFIX/include/aws/cal/cal.h  # [unix]
    - if not exist %LIBRARY_INC%\\aws\\cal\\cal.h exit 1          # [win]
    - if not exist %PREFIX%\\Library\\bin\\aws-c-cal.dll exit 1  # [win]

about:
  home: https://github.com/awslabs/aws-c-cal
  license: Apache-2.0
  license_family: Apache
  license_file: LICENSE
  summary: 'Aws Crypto Abstraction Layer: Cross-Platform, C99 wrapper for cryptography primitives.'

extra:
  recipe-maintainers:
    - xhochy
