{% set version = '1.3.2.1' %}

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

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

source:
  fn: SKAT_{{ version }}.tar.gz
  url:
    - https://cran.r-project.org/src/contrib/SKAT_{{ version }}.tar.gz
    - https://cran.r-project.org/src/contrib/Archive/SKAT/SKAT_{{ version }}.tar.gz
  sha256: 7442408ccd1b9d2abb3f3dbd27e1b46e50b87042195bc46ce25fe0d887f98e7a

build:
  merge_build_host: True  # [win]
  number: 1
  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

  run:
    - r-base

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

about:
  home: https://CRAN.R-project.org/package=SKAT
  license: GPL (>= 2)
  summary: Functions for kernel-regression-based association tests including Burden test, SKAT
    and SKAT-O. These methods aggregate individual SNP score statistics in a SNP set
    and efficiently compute SNP-set level p-values.
  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:
    - johanneskoester
    - bgruening
    - daler
    - jdblischak
    - bsennblad
