{% set version = "2.0-9" %}

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

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

source:
  fn: extRemes_{{ version }}.tar.gz
  url:
    - https://cran.r-project.org/src/contrib/extRemes_{{ version }}.tar.gz
    - https://cran.r-project.org/src/contrib/Archive/extRemes/extRemes_{{ version }}.tar.gz
  sha256: 7543e0cb97f12d0dad5b60575b98e6b7e73dc6e87e622b8c39def734a562fb32

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

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

requirements:
  build:
    - posix                # [win]
    - {{ compiler('c') }}        # [unix]
    - {{ compiler('m2w64_c') }}  # [win]
  host:
    - r-base
    - r-lmoments
    - r-car
    - r-distillery

  run:
    - r-base
    - r-lmoments
    - r-car
    - r-distillery

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

about:
  home: http://www.assessment.ucar.edu/toolkit/
  license: GPL (>= 2)
  summary: Functions for performing extreme value analysis.
  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:
    - dpryan79
    - johanneskoester
    - bgruening
    - daler
    - jdblischak
