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

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

source:
  url:
    - {{ cran_mirror }}/src/contrib/rcmdcheck_{{ version }}.tar.gz
    - {{ cran_mirror }}/src/contrib/Archive/rcmdcheck/rcmdcheck_{{ version }}.tar.gz
  sha256: 4f3b1fba7635ba74c7e77151fd45ff6a3f8fae1e3fca7b1c60afa75e69fa918e

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-r6
    - r-callr >=2.0.0
    - r-cli
    - r-crayon
    - r-desc >=1.2.0
    - r-digest
    - r-pkgbuild
    - r-prettyunits
    - r-rprojroot
    - r-withr
    - r-xopen
  run:
    - r-base
    - r-r6
    - r-callr >=2.0.0
    - r-cli
    - r-crayon
    - r-desc >=1.2.0
    - r-digest
    - r-pkgbuild
    - r-prettyunits
    - r-rprojroot
    - r-withr
    - r-xopen

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

about:
  home: https://github.com/r-Lib/rcmdcheck#readme
  license: MIT
  summary: Run 'R CMD check' from 'R' programmatically, and capture the results of the individual
    checks.
  license_family: MIT
  license_file: '{{ environ["PREFIX"] }}/lib/R/share/licenses/MIT'  # [unix]
  license_file: '{{ environ["PREFIX"] }}\R\share\licenses\MIT'  # [win]

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