{% set version = '1.4.0' %}

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

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

source:
  fn: rstantools_{{ version }}.tar.gz
  url:
    - https://cran.r-project.org/src/contrib/rstantools_{{ version }}.tar.gz
    - https://cran.r-project.org/src/contrib/Archive/rstantools/rstantools_{{ version }}.tar.gz
  sha256: 5909ec3511f4b0448f2cf46fb18b16e132d3c42593ea9629b58c8a063c8336cc

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

requirements:
  build:
    - r-base

  run:
    - r-base

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

about:
  home: http://mc-stan.org/, http://discourse.mc-stan.org
  license: GPL (>= 3)
  summary: Provides various tools for developers of R packages interfacing with
    'Stan' <http://mc-stan.org>, including functions to set up the required package structure,
    S3 generics and default methods to unify function naming across 'Stan'-based R packages,
    and a vignette with recommendations for developers.
  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
