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

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

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

source:
  fn: scrm_{{ version }}.tar.gz
  url:
    - https://cran.r-project.org/src/contrib/scrm_{{ version }}.tar.gz
    - https://cran.r-project.org/src/contrib/Archive/scrm/scrm_{{ version }}.tar.gz

  sha256: 5fed680bbcdbd396ece2e9981395dbe8bec8644e2e5d584edacb8da042ef7988

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

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

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

  run:
    - r-base
    - r-rcpp
    - libgcc  # [not win]

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

about:
  home: https://cran.r-project.org/web/packages/scrm/index.html
  license: GPL (>= 3)
  summary: A coalescent simulator that allows the rapid simulation of biological sequences under
    neutral models of evolution. Different to other coalescent based simulations, it
    has an optional approximation parameter that allows for high accuracy while maintaining
    a linear run time cost for long sequences. It is optimized for simulating massive
    data sets as produced by Next- Generation Sequencing technologies for up to several
    thousand sequences.
  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:
    - MathiasHaudgaard
    - FrodePedersen
    - ArneKr
    - johanneskoester
    - bgruening
    - daler
    - jdblischak
