{% set version = '1.2.4' %}

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

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

source:
  fn: rngtools_{{ version }}.tar.gz
  url:
    - https://cran.r-project.org/src/contrib/rngtools_{{ version }}.tar.gz
    - https://cran.r-project.org/src/contrib/Archive/rngtools/rngtools_{{ version }}.tar.gz
  sha256: 27019835b750f470b13dbb7fecd3b839a61b52774e23fffa191f919533768fb9

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

requirements:
  build:
    - r-base
    - r-digest
    - r-pkgmaker >=0.20
    - r-stringr
  run:
    - r-base
    - r-digest
    - r-pkgmaker >=0.20
    - r-stringr

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

about:
  home: https://renozao.github.io/rngtools
  license: GPL-3
  summary: This package contains a set of functions for working with Random Number Generators
    (RNGs). In particular, it defines a generic S4 framework for getting/setting the
    current RNG, or RNG data that are embedded into objects for reproducibility. Notably,
    convenient default methods greatly facilitate the way current RNG settings can be
    changed.
  license_family: GPL3

extra:
  recipe-maintainers:
    - johanneskoester
    - bgruening
