{% set version = '2.6-0' %}

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

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

source:
  fn: pls_{{ version }}.tar.gz
  url:
    - https://cran.r-project.org/src/contrib/pls_{{ version }}.tar.gz
    - https://cran.r-project.org/src/contrib/Archive/pls/pls_{{ version }}.tar.gz
  sha256: 3d8708fb7f45863d3861fd231e06955e6750bcbe717e1ccfcc6d66d0cb4d4596

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

requirements:
  build:
    - r-base
  run:
    - r-base

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

about:
  home: http://mevik.net/work/software/pls.html
  license: GPL-2
  summary: Multivariate regression methods Partial Least Squares Regression (PLSR), Principal
    Component Regression (PCR) and Canonical Powered Partial Least Squares (CPPLS).
  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:
    - cbrueffer
    - johanneskoester
    - bgruening
    - daler
    - jdblischak
