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

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

source:
  fn: stringr_{{ version }}.tar.gz
  url:
    - {{ cran_mirror }}/src/contrib/stringr_{{ version }}.tar.gz
    - {{ cran_mirror }}/src/contrib/Archive/stringr/stringr_{{ version }}.tar.gz
  sha256: a4adec51bb3f04214b1d8ef40d3a58949f21b1497cbeaf2ba552e0891eef45de

build:
  noarch: generic
  merge_build_host: true  # [win]
  number: 0

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

requirements:
  build:
    - {{ posix }}zip               # [win]

  host:
    - r-base
    - r-cli
    - r-glue >=1.6.1
    - r-lifecycle >=1.0.3
    - r-magrittr
    - r-rlang >=1.0.0
    - r-stringi >=1.5.3
    - r-vctrs

  run:
    - r-base
    - r-cli
    - r-glue >=1.6.1
    - r-lifecycle >=1.0.3
    - r-magrittr
    - r-rlang >=1.0.0
    - r-stringi >=1.5.3
    - r-vctrs

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

about:
  home: https://stringr.tidyverse.org
  dev_url: https://github.com/tidyverse/stringr
  license: MIT
  summary: A consistent, simple and easy to use set of wrappers around the fantastic 'stringi' package. All function and argument names (and positions) are consistent, all functions deal with "NA"'s and zero length vectors in the same way, and the output from one function is easy to feed into the input of another.
  license_family: MIT
  license_file:
    - {{ environ["PREFIX"] }}/lib/R/share/licenses/MIT
    - LICENSE

extra:
  recipe-maintainers:
    - conda-forge/r
    - ocefpaf
