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

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

source:
  fn: HDInterval_{{ version }}.tar.gz
  url:
    - {{ cran_mirror }}/src/contrib/HDInterval_{{ version }}.tar.gz
    - {{ cran_mirror }}/src/contrib/Archive/HDInterval/HDInterval_{{ version }}.tar.gz
  sha256: 349e0af81741d1b03386caebae77ac4505bc13dae194bb013b7d6cc51bc0a1f8

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

requirements:
  build:
    - {{posix}}zip               # [win]
  host:
    - r-base
  run:
    - r-base

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

about:
  home: https://CRAN.R-project.org/package=HDInterval
  license: GPL-3
  summary: A generic function and a set of methods to calculate highest density intervals for
    a variety of classes of objects which can specify a probability density distribution,
    including MCMC output, fitted density objects, and functions.
  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
