{% set version = '0.2.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: b5bce370422d4c0ec9509249ae645373949bfbe9217cdf50dce2bfbdad9f7cd7

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

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

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

  run:
    - r-base
    - r-magrittr
    - 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

extra:
  recipe-maintainers:
    - johanneskoester
    - bgruening
