{% set name="openssl" %}
{% set version="1.0.2l" %}

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

source:
  fn: {{ name }}-{{ version }}.tar.gz
  url: http://www.openssl.org/source/{{ name }}-{{ version }}.tar.gz
  sha256: ce07195b659e75f4e1db43552860070061f156a98bb37b672b101ba6e3ddf30c
  patches:
    - 0001-win32-Fix-yasm-compatibility.patch

build:
  number: 2
  no_link: lib/libcrypto.so.1.0.0        # [linux]
  no_link: lib/libcrypto.1.0.0.dylib     # [osx]
  has_prefix_files:                      # [unix]
    - bin/c_rehash                       # [unix]
    - include/openssl/opensslconf.h      # [unix]
    - lib/pkgconfig/libcrypto.pc         # [unix]
    - lib/pkgconfig/libssl.pc            # [unix]
    - lib/pkgconfig/openssl.pc           # [unix]
  features:
    - vc{{ vc }}     # [win]

requirements:
  build:
    - {{ compiler('c') }}
    - yasm               # [win32]
    - perl
  run:
    - ca-certificates

test:
  commands:
    - copy NUL checksum.txt        # [win]
    - touch checksum.txt           # [unix]
    - openssl sha256 checksum.txt

about:
  home: http://www.openssl.org/
  license_file: LICENSE
  license: OpenSSL
  license_family: Apache
  summary: OpenSSL is an open-source implementation of the SSL and TLS protocols
  dev_url: https://github.com/openssl/openssl
  doc_url: https://www.openssl.org/docs/man1.0.2/

extra:
  recipe-maintainers:
    - jakirkham
    - jjhelmus
    - msarahan
    - ocefpaf
    - pelson
