{% set version = "0.6.10" %}

package:
  name: r-digest
  version: {{ version }}

source:
  fn: digest_{{ version }}.tar.gz
  url:
    - http://cran.r-project.org/src/contrib/digest_{{ version }}.tar.gz
    - http://cran.r-project.org/src/contrib/Archive/digest/digest_{{ version }}.tar.gz
  sha256: 0c51a02756009ecfb3b7e22789c9410ee8c73d016c6a7c477f05511bd029021d

build:
  number: 0
  skip: True  # [win32]
  script: R CMD INSTALL --build .
  rpaths:
    - lib/R/lib/
    - lib/

requirements:  # [not win32]
  build:  # [not win32]
    - r-base  # [not win32]
    - posix  # [win64]
    - m2w64-toolchain  # [win64]
    - gcc  # [not win]
  run:  # [not win32]
    - r-base  # [not win32]

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

about:
  home: http://dirk.eddelbuettel.com/code/digest.html
  license: GPL-2.0
  summary: "Implementation of a function 'digest()' for the creation  of hash digests of arbitrary
    R objects (using the 'md5', 'sha-1', 'sha-256',  'crc32', 'xxhash' and 'murmurhash'
    algorithms) permitting easy comparison of R language objects, as well as a function
    'hmac()' to create hash-based message authentication code. Please note that this
    package is not meant to be deployed for cryptographic purposes for which more comprehensive
    (and widely tested) libraries such as 'OpenSSL' should be used."

extra:
  recipe-maintainers:
    - ocefpaf
