{% set version = '1.1.0' %}

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

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

source:
  fn: desc_{{ version }}.tar.gz
  url:
    - https://cran.r-project.org/src/contrib/desc_{{ version }}.tar.gz
    - https://cran.r-project.org/src/contrib/Archive/desc/desc_{{ version }}.tar.gz
  sha256: f94ac3c0a03504ec845f945e77f3b0ad5ef9abf2cefcfe9fd1477acc63958155

build:
  number: 0
  skip: true  # [win32]

  rpaths:
    - lib/R/lib/
    - lib/

requirements:
  build:
    - r-base
    - r-r6
    - r-assertthat
    - r-crayon
    - r-rprojroot

  run:
    - r-base
    - r-r6
    - r-assertthat
    - r-crayon
    - r-rprojroot

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

about:
  home: https://github.com/r-pkgs/desc
  license: MIT
  summary: Tools to read, write, create, and manipulate DESCRIPTION files. It is intended for
    packages that create or manipulate other packages.
  license_family: MIT

extra:
  recipe-maintainers:
    - johanneskoester
    - bgruening
