{% set version = '0.0.3' %}

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

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

source:
  fn: DRR_{{ version }}.tar.gz
  url:
    - https://cran.r-project.org/src/contrib/DRR_{{ version }}.tar.gz
    - https://cran.r-project.org/src/contrib/Archive/DRR/DRR_{{ version }}.tar.gz
  sha256: 7493389c1fb9ddc4d4261e15bf2d4198603227275688b1d3e3994d47e976a1f9

build:
  number: 0
  skip: true  # [win32]
  rpaths:
    - lib/R/lib/
    - lib/

requirements:
  build:
    - r-base
    - r-cvst
    - r-matrix
    - r-kernlab

  run:
    - r-base
    - r-cvst
    - r-matrix
    - r-kernlab

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

about:
  home: https://github.com/gdkrmr/DRR
  license: GPL-3
  summary: An Implementation of Dimensionality Reduction via Regression using Kernel Ridge Regression.
  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:
    - cbrueffer
    - johanneskoester
    - bgruening
    - daler
    - jdblischak
