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

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

source:
  fn: spelling_{{ version }}.tar.gz
  url:
    - {{ cran_mirror }}/src/contrib/spelling_{{ version }}.tar.gz
    - {{ cran_mirror }}/src/contrib/Archive/spelling/spelling_{{ version }}.tar.gz
  sha256: 448772eccd4b7bfd8788a7a8064140cab92ff666134cdc512be00b0b3eefbdbd

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-commonmark
    - r-hunspell >=2.9
    - r-knitr
    - r-xml2
  run:
    - r-base
    - r-commonmark
    - r-hunspell >=2.9
    - r-knitr
    - r-xml2

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

about:
  home: https://github.com/ropensci/spelling#readme
  license: MIT
  summary: Spell checking common document formats including latex, markdown, manual pages, and
    description files. Includes utilities to automate checking of documentation and  vignettes
    as a unit test during 'R CMD check'. Both British and American English are  supported
    out of the box and other languages can be added. In addition, packages may define
    a 'wordlist' to allow custom terminology without having to abuse punctuation.
  license_family: MIT

extra:
  recipe-maintainers:
    - johanneskoester
    - bgruening
    - daler
    - jdblischak
    - cbrueffer
    - dbast
