{% set version = '1.1-1' %}

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

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

source:
  fn: Rook_{{ version }}.tar.gz
  url:
    - https://cran.r-project.org/src/contrib/Rook_{{ version }}.tar.gz
    - https://cran.r-project.org/src/contrib/Archive/Rook/Rook_{{ version }}.tar.gz
  sha256: 00f4ecfa4c5c57018acbb749080c07154549a6ecaa8d4130dd9de79427504903

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

requirements:
  build:
    - r-base
    - r-brew
    - posix                # [win]
    - {{native}}toolchain  # [win]
    - gcc                  # [not win]
  run:
    - r-base
    - r-brew
    - libgcc  # [not win]

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

about:
  home: https://CRAN.R-project.org/package=Rook
  license: GPL-2
  summary: |
    This package contains the Rook specification and convenience software for building
    and running Rook applications. To get started, be sure and read the 'Rook' help
    file first.
  license_family: GPL2

extra:
  recipe-maintainers:
    - johanneskoester
    - bgruening
