{% set version = '0.3-54' %}

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

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

source:
  fn: clue_{{ version }}.tar.gz
  url:
    - https://cran.r-project.org/src/contrib/clue_{{ version }}.tar.gz
    - https://cran.r-project.org/src/contrib/Archive/clue/clue_{{ version }}.tar.gz
  sha256: 4e91b3313cd320b0e028aa732e2ad2e8dd64bebf34cfa2f220c2a107220fd4ba

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

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

requirements:
  build:
    - r-base
    - r-cluster
    - posix                # [win]
    - {{native}}toolchain  # [win]
    - gcc                  # [not win]

  run:
    - r-base
    - r-cluster
    - {{native}}gcc-libs   # [win]
    - libgcc               # [not win]

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

about:
  home: https://CRAN.R-project.org/package=clue
  license: GPL-2
  summary: CLUster Ensembles.
  license_family: GPL2
  license_file: '{{ environ["PREFIX"] }}/lib/R/share/licenses/GPL-2'   # [unix]
  license_file: '{{ environ["PREFIX"] }}\R\share\licenses\GPL-2'   # [win]

extra:
  recipe-maintainers:
    - johanneskoester
    - bgruening
    - daler
    - jdblischak
