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

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

source:
  fn: hash_{{ version }}.tar.gz
  url:
    - {{ cran_mirror }}/src/contrib/hash_{{ version }}.tar.gz
    - {{ cran_mirror }}/src/contrib/Archive/hash/hash_{{ version }}.tar.gz
  sha256: df93f119d62d4e0d33afcfb5bfd5770565b5a66d766dfb07126b445b572a7d56

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

requirements:
  build:
    - {{posix}}zip               # [win]
  host:
    - r-base
  run:
    - r-base

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

about:
  home: https://CRAN.R-project.org/package=hash
  license: GPL (>= 2)
  summary: This package implements a data structure similar to hashes in Perl and dictionaries
    in Python but with a purposefully R flavor.  For objects of appreciable size, access
    using hashes outperforms native named lists and vectors.
  license_family: GPL3
  license_file: '{{ environ["PREFIX"] }}/lib/R/share/licenses/GPL-3'  # [unix]
  license_file: '{{ environ["PREFIX"] }}\R\share\licenses\GPL-3'  # [win]

extra:
  recipe-maintainers:
    - wjurkowski
    - nsoranzo
    - johanneskoester
    - bgruening
    - daler
    - jdblischak
    - cbrueffer
