{% set version = '1.2-1' %}

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

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

source:
  fn: baseline_{{ version }}.tar.gz
  url:
    - https://cran.r-project.org/src/contrib/baseline_{{ version }}.tar.gz
    - https://cran.r-project.org/src/contrib/Archive/baseline/baseline_{{ version }}.tar.gz
  sha256: feeda85700464cdc544beb533c440079327cb5e3d225b0a18d0a207091db60ee

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

requirements:
  build:
    - r-base
    - r-sparsem

  run:
    - r-base
    - r-sparsem

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

about:
  home: https://CRAN.R-project.org/package=baseline
  license: GPL-2
  summary: Collection of baseline correction algorithms, along with a framework and a GUI for
    optimising baseline algorithm parameters. Typical use of the package is for removing
    background effects from spectra originating from various types of spectroscopy and
    spectrometry, possibly optimizing this with regard to regression or classification
    results. Correction methods include polynomial fitting, weighted local smoothers
    and many more.
  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
