{% set version = "1.4.4" %}
{% set posix = 'm2-' if win else '' %}
{% set native = 'm2w64-' if win else '' %}

package:
  name: r-openssl
  version: {{ version|replace("-", "_") }}

source:
  url:
    - {{ cran_mirror }}/src/contrib/openssl_{{ version }}.tar.gz
    - {{ cran_mirror }}/src/contrib/Archive/openssl/openssl_{{ version }}.tar.gz
  sha256: 920fb4494da6cf78b55937a9f645d11dae4d7982afa640f28c1be74d486cc874

build:
  merge_build_host: true  # [win]
  number: 0
  rpaths:
    - lib/R/lib/
    - lib/

requirements:
  build:
    - {{ compiler('c') }}              # [not win]
    - {{ compiler('m2w64_c') }}        # [win]
    - {{ posix }}filesystem        # [win]
    - {{ posix }}sed               # [win]
    - {{ posix }}grep              # [win]
    - {{ posix }}autoconf
    - {{ posix }}automake          # [not win]
    - {{ posix }}automake-wrapper  # [win]
    - {{ posix }}pkg-config
    - {{ posix }}make
    - {{ posix }}coreutils         # [win]
    - {{ posix }}zip               # [win]
  host:
    - r-base
    - openssl
    - r-askpass
  run:
    - r-base
    - openssl
    - {{ native }}gcc-libs         # [win]
    - r-askpass

test:
  commands:
    - $R -e "library('openssl')"           # [not win]
    - "\"%R%\" -e \"library('openssl')\""  # [win]

about:
  home: https://github.com/jeroen/openssl#readme
  license: MIT
  summary: Bindings to OpenSSL libssl and libcrypto, plus custom SSH key parsers. Supports RSA, DSA and EC curves P-256, P-384, P-521, and curve25519. Cryptographic signatures can either be created and verified manually or via x509 certificates.  AES can be used in cbc, ctr or gcm mode for symmetric encryption; RSA for asymmetric
    (public key) encryption or EC for Diffie Hellman. High-level envelope functions  combine RSA and AES for encrypting arbitrary sized data. Other utilities include key generators, hash functions (md5, sha1, sha256, etc), base64 encoder, a secure random number generator, and 'bignum' math methods for manually performing
    crypto  calculations on large multibyte integers.
  license_family: MIT
  license_file:
    - {{ environ["PREFIX"] }}/lib/R/share/licenses/MIT
    - LICENSE

extra:
  recipe-maintainers:
    - conda-forge/r

# Package: openssl
# Type: Package
# Title: Toolkit for Encryption, Signatures and Certificates Based on OpenSSL
# Version: 1.4.1
# Authors@R: c(person("Jeroen", "Ooms", role = c("aut", "cre"), email = "jeroen@berkeley.edu", comment = c(ORCID = "0000-0002-4035-0289")), person("Oliver", "Keyes", role = "ctb"))
# Description: Bindings to OpenSSL libssl and libcrypto, plus custom SSH key parsers. Supports RSA, DSA and EC curves P-256, P-384, P-521, and curve25519. Cryptographic signatures can either be created and verified manually or via x509 certificates.  AES can be used in cbc, ctr or gcm mode for symmetric encryption; RSA for asymmetric (public key) encryption or EC for Diffie Hellman. High-level envelope functions  combine RSA and AES for encrypting arbitrary sized data. Other utilities include key generators, hash functions (md5, sha1, sha256, etc), base64 encoder, a secure random number generator, and 'bignum' math methods for manually performing crypto  calculations on large multibyte integers.
# License: MIT + file LICENSE
# URL: https://github.com/jeroen/openssl#readme
# BugReports: https://github.com/jeroen/openssl/issues
# SystemRequirements: OpenSSL >= 1.0.1
# VignetteBuilder: knitr
# Imports: askpass
# Suggests: testthat, digest, knitr, rmarkdown, jsonlite, jose, sodium
# RoxygenNote: 6.1.1
# Encoding: UTF-8
# NeedsCompilation: yes
# Packaged: 2019-07-16 17:55:20 UTC; jeroen
# Author: Jeroen Ooms [aut, cre] (<https://orcid.org/0000-0002-4035-0289>), Oliver Keyes [ctb]
# Maintainer: Jeroen Ooms <jeroen@berkeley.edu>
# Repository: CRAN
# Date/Publication: 2019-07-18 06:35:27 UTC
