{% set version = '0.3.0' %}

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

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

source:
  fn: forcats_{{ version }}.tar.gz
  url:
    - https://cran.r-project.org/src/contrib/forcats_{{ version }}.tar.gz
    - https://cran.r-project.org/src/contrib/Archive/forcats/forcats_{{ version }}.tar.gz
  sha256: 95814610ec18b8a8830eba63751954387f9d21400d6ab40394ed0ff22c0cb657

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

requirements:
  build:
    - r-base
    - r-magrittr
    - r-rlang
    - r-tibble

  run:
    - r-base
    - r-magrittr
    - r-rlang
    - r-tibble

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

about:
  home: http://forcats.tidyverse.org, https://github.com/tidyverse/forcats
  license: GPL-3
  summary: Helpers for reordering factor levels (including moving specified levels to front,
    ordering by first appearance, reversing, and randomly shuffling), and tools for
    modifying factor levels (including collapsing rare levels into other, 'anonymising',
    and manually 'recoding').
  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:
    - cbrueffer
    - johanneskoester
    - bgruening
    - daler
    - jdblischak
