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

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

source:
  fn: snakecase_{{ version }}.tar.gz
  url:
    - {{ cran_mirror }}/src/contrib/snakecase_{{ version }}.tar.gz
    - {{ cran_mirror }}/src/contrib/Archive/snakecase/snakecase_{{ version }}.tar.gz
  sha256: d2d33851f24fc25636fa63b3020a56f10f54369b19435e81e644d0364a54ddbc

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

requirements:
  build:
    - {{posix}}zip               # [win]
  host:
    - r-base
    - r-stringi
    - r-stringr
  run:
    - r-base
    - r-stringi
    - r-stringr

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

about:
  home: https://github.com/Tazinho/snakecase
  license: GPL-3
  summary: A consistent, flexible and easy to use tool to parse and convert strings into cases
    like snake or camel among others.
  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:
    - johanneskoester
    - bgruening
    - daler
    - jdblischak
    - cbrueffer
    - dbast
