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

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

source:
  fn: dimRed_{{ version }}.tar.gz
  url:
    - {{ cran_mirror }}/src/contrib/dimRed_{{ version }}.tar.gz
    - {{ cran_mirror }}/src/contrib/Archive/dimRed/dimRed_{{ version }}.tar.gz
  sha256: fb0cef7a21b8a5219c74e5227a282168599dd63e904130366f3d2fed8a625a39

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

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

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

about:
  home: https://github.com/gdkrmr/dimRed
  license: GPL-3
  summary: A collection of dimensionality reduction techniques from R packages and provides a
    common interface for calling the methods.
  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
