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

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

source:
  fn: maxstat_{{ version }}.tar.gz
  url:
    - {{ cran_mirror }}/src/contrib/maxstat_{{ version }}.tar.gz
    - {{ cran_mirror }}/src/contrib/Archive/maxstat/maxstat_{{ version }}.tar.gz
  sha256: 6fc13b8d83797e10fc148183eb440a30584442fdf73628652c606ede790e9f84

build:
  merge_build_host: True  # [win]
  number: 2
  skip: true  # [win32]
  rpaths:
    - lib/R/lib/
    - lib/

requirements:
  build:
    - {{ compiler('c') }}        # [not win]
    - {{native}}toolchain        # [win]
    - {{posix}}filesystem        # [win]
    - {{posix}}make
    - {{posix}}sed               # [win]
    - {{posix}}coreutils         # [win]
    - {{posix}}zip               # [win]
  host:
    - r-base
    - r-exactranktests >=0.8_23
    - r-mvtnorm >=0.5_10
  run:
    - r-base
    - {{native}}gcc-libs         # [win]
    - r-exactranktests >=0.8_23
    - r-mvtnorm >=0.5_10

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

about:
  home: https://CRAN.R-project.org/package=maxstat
  license: GPL (>= 2)
  summary: Maximally selected rank statistics with several p-value approximations.
  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
    - cbrueffer
    - dbast
