{% set version = '1.0' %}

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

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

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

  sha256: e97086c85e26dc0803b27b630060ff455f0a797837d57c1c703516c209809642

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

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

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

  run:
    - r-base
    - r-gdata
    - r-lattice
    - libgcc  # [not win]

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

about:
  home: https://CRAN.R-project.org/package=QTLRel
  license: GPL (>= 2)
  summary: This software provides tools for quantitative trait mapping in populations such as
    advanced intercross lines where relatedness among individuals should not be ignored.
    It can estimate background genetic variance components, impute missing genotypes,
    simulate genotypes, perform a genome scan for putative quantitative trait loci (QTL),
    and plot mapping results. It also has functions to calculate identity coefficients
    from pedigrees, especially suitable for pedigrees that consist of a large number
    of generations, or estimate identity coefficients from genotypic data in certain
    circumstances.
  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
