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

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

source:
  fn: rsample_{{ version }}.tar.gz
  url:
    - {{ cran_mirror }}/src/contrib/rsample_{{ version }}.tar.gz
    - {{ cran_mirror }}/src/contrib/Archive/rsample/rsample_{{ version }}.tar.gz
  sha256: aeaab3dc6c407707668610316dee6c8288c403fdbdfcd59d908500c588bf9582

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

requirements:
  build:
    - {{posix}}zip               # [win]
  host:
    - r-base
    - r-broom
    - r-dplyr
    - r-purrr
    - r-recipes
    - r-rlang
    - r-tibble
    - r-tidyr
  run:
    - r-base
    - r-broom
    - r-dplyr
    - r-purrr
    - r-recipes
    - r-rlang
    - r-tibble
    - r-tidyr

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

about:
  home: https://topepo.github.io/rsample
  license: GPL-2
  summary: 'Classes and functions to create and summarize different types of resampling objects
    (e.g. bootstrap, cross-validation). '
  license_family: GPL2
  license_file: '{{ environ["PREFIX"] }}/lib/R/share/licenses/GPL-2'  # [unix]
  license_file: '{{ environ["PREFIX"] }}\R\share\licenses\GPL-2'  # [win]

extra:
  recipe-maintainers:
    - johanneskoester
    - bgruening
    - daler
    - jdblischak
    - cbrueffer
    - dbast
