{% set version = "1.7.9" %}

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

package:
  name: r-haplo.stats
  version: {{ version|replace("-", "_") }}

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

  sha256: bd0adec41cc0ab45eb2674f6f7c40ffe0011e5198883dedb071f178c99567da6

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

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

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

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

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

about:
  home: https://cran.r-project.org/web/packages/haplo.stats/index.html
  license: GPL (>= 2)
  summary: Routines for the analysis of indirectly measured haplotypes. The statistical methods
    assume that all subjects are unrelated and that haplotypes are ambiguous (due to
    unknown linkage phase of the genetic markers). The main functions are
  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
