{% set version = '0.9-25' %}

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

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

source:
  fn: kernlab_{{ version }}.tar.gz
  url:
    - https://cran.r-project.org/src/contrib/kernlab_{{ version }}.tar.gz
    - https://cran.r-project.org/src/contrib/Archive/kernlab/kernlab_{{ version }}.tar.gz
  sha256: b9de072754bb03c02c4d6a5ca20f2290fd090de328b55ab334ac0b397ac2ca62

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

  rpaths:
    - lib/R/lib/
    - lib/
requirements:
  build:
    - r-base
    - posix                # [win]
    - {{native}}toolchain  # [win]
    - gcc                  # [not win]

  run:
    - r-base
    - libgcc  # [not win]

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

about:
  home: https://CRAN.R-project.org/package=kernlab
  license: GPL-2
  summary: Kernel-based machine learning methods for classification, regression, clustering,
    novelty detection, quantile regression and dimensionality reduction.  Among other
    methods 'kernlab' includes Support Vector Machines, Spectral Clustering, Kernel
    PCA, Gaussian Processes and a QP solver.
  license_family: GPL2

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