{% set version = '1.0.3' %}

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

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

source:
  fn: rversions_{{ version }}.tar.gz
  url:
    - https://cran.r-project.org/src/contrib/rversions_{{ version }}.tar.gz
    - https://cran.r-project.org/src/contrib/Archive/rversions/rversions_{{ version }}.tar.gz
  sha256: 21d0809f46505de89a2be7be9449e39c39cff5bc77e584dec976ee6c0b884f44

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

  rpaths:
    - lib/R/lib/
    - lib/
requirements:
  build:
    - r-base
    - r-curl
    - r-xml2 >=1.0.0

  run:
    - r-base
    - r-curl
    - r-xml2 >=1.0.0

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

about:
  home: https://github.com/metacran/rversions
  license: MIT
  summary: Query the main 'R' 'SVN' repository to find the versions 'r-release' and 'r-oldrel'
    refer to, and also all previous 'R' versions and their release dates.
  license_family: MIT

extra:
  recipe-maintainers:
    - johanneskoester
    - bgruening
