{% set version = '1.1.1' %}

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

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

source:
  fn: heatmap3_{{ version }}.tar.gz
  url:
    - https://cran.r-project.org/src/contrib/heatmap3_{{ version }}.tar.gz
    - https://cran.r-project.org/src/contrib/Archive/heatmap3/heatmap3_{{ version }}.tar.gz
  sha256: 055e30a2fee0e8b6e499cdc5ccb7e37e5615ed3d52cc7058fc5ca5fc808cf393

build:
  number: 0
  skip: true  # [win32]

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

requirements:
  build:
    - r-base
    - r-fastcluster

  run:
    - r-base
    - r-fastcluster

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

about:
  home: https://CRAN.R-project.org/package=heatmap3
  license: GPL (>= 2)
  summary: An improved heatmap package. Completely compatible with the original R function 'heatmap',
    and provides more powerful and convenient features.
  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
