{% set version = '2.4-1' %}

{% 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: d0e087d338d89372c251c18fc93b53fb24b1750ea154833216ff16aff3b1eaf4

build:
  number: 1
  skip: true  # [win32]

  rpaths:
    - lib/R/lib/
    - lib/

requirements:
  build:
    - r-base
    - posix                # [win]
    - {{native}}toolchain  # [win]
    - gcc                  # [not win]

  run:
    - r-base
    - libgcc  # [not win]

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
extra:
   recipe-maintainers:
    - dpryan79
    - MathiasHaudgaard
    - FrodePedersen
    - ArneKr
    - johanneskoester
    - bgruening
    - daler
    - jdblischak
