{% set version = "0.9.1" %}

{% 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:
    - https://cran.r-project.org/src/contrib/snakecase_{{ version }}.tar.gz
    - https://cran.r-project.org/src/contrib/Archive/snakecase/snakecase_{{ version }}.tar.gz
  sha256: db5f38e0d8d4b3410e372d430d90f20cd3a0c51f2ce725a022552b04da168608

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

requirements:
  build:
    - 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:
    - cbrueffer
    - johanneskoester
    - bgruening
    - daler
    - jdblischak
