{% set version = "2.4-2" %}

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

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

source:
  fn: filehash_{{ version }}.tar.gz
  url:
    - https://cran.r-project.org/src/contrib/filehash_{{ version }}.tar.gz
    - https://cran.r-project.org/src/contrib/Archive/filehash/filehash_{{ version }}.tar.gz

  sha256: b6d056f75d45e315943a4618f5f62802612cd8931ba3f9f474b595140a3cfb93

build:
  merge_build_host: True  # [win]
  number: 2
  rpaths:
    - lib/R/lib/
    - lib/

requirements:
  build:
    - posix                # [win]
    - {{ compiler('c') }}        # [unix]
    - {{ compiler('m2w64_c') }}  # [win]
  host:
    - r-base
  run:
    - r-base

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

about:
  home: https://cran.r-project.org/web/packages/filehash/index.html
  license: GPL (>= 2)
  summary: Implements a simple key-value style database where character string keys are associated
    with data values that are stored on the disk. A simple interface is provided for
    inserting, retrieving, and deleting data from the database. Utilities are provided
    that allow 'filehash' databases to be treated much like environments and lists are
    already used in R. These utilities are provided to encourage interactive and exploratory
    analysis on large datasets. Three different file formats for representing the database
    are currently available and new formats can easily be incorporated by third parties
    for use in the 'filehash' framework.
  license_family: GPL3
  license_file: '{{ environ["PREFIX"] }}/lib/R/share/licenses/GPL-3'

extra:
   recipe-maintainers:
    - conda-forge/r
    - dpryan79
    - MathiasHaudgaard
    - FrodePedersen
    - ArneKr
    - johanneskoester
    - bgruening
    - daler
    - jdblischak
