{% set version = '1.8-0' %}

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

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

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

  sha256: 434fc806b918738ec67171a37a47099d1706332819317e368fe0ccb8f149a469

build:
  merge_build_host: True  # [win]
  number: 1002
  skip: true  # [win32]

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

requirements:
  build:
    - posix                # [win]
    - {{ compiler('c') }}        # [unix]
    - {{ compiler('m2w64_c') }}  # [win]
    - {{ compiler('cxx') }}        # [unix]
    - {{ compiler('m2w64_cxx') }}  # [win]
  host:
    - r-base
    - r-genabel.data
    - r-mass

  run:
    - r-base
    - r-genabel.data
    - r-mass

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

about:
  home: http
  license: GPL (>= 2)
  summary: a package for genome-wide association analysis between  quantitative or binary traits
    and single-nucleotide polymorphisms (SNPs).
  license_family: GPL3
  license_file: '{{ environ["PREFIX"] }}/lib/R/share/licenses/GPL-3'
extra:
   recipe-maintainers:
    - dpryan79
    - MathiasHaudgaard
    - FrodePedersen
    - ArneKr
    - Johanneskoester
    - Bgruening
    - Daler
    - Jdblischak
