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

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-glue >=1.2.0
    - r-magrittr
    - r-stringi >=1.1.7

  run:
    - r-base
    - r-glue >=1.2.0
    - r-magrittr
    - r-stringi >=1.1.7

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

about:
  home: http://stringr.tidyverse.org, https://github.com/tidyverse/stringr
  license: GPL-2
  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: 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:
    - ocefpaf
    - cbrueffer
    - johanneskoester
    - bgruening
    - daler
    - jdblischak
