{% set version = '1.1' %}

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

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

source:
  fn: smoother_{{ version }}.tar.gz
  url:
    - https://cran.r-project.org/src/contrib/smoother_{{ version }}.tar.gz
    - https://cran.r-project.org/src/contrib/Archive/smoother/smoother_{{ version }}.tar.gz

  sha256: 91b55b82f805cfa1deedacc0a4e844a2132aa59df593f3b05676954cf70a195b

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

  rpaths:
    - lib/R/lib/
    - lib/

requirements:
  build:
    - r-base
    - r-ttr >=0.22

  run:
    - r-base
    - r-ttr >=0.22

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

about:
  home: https://CRAN.R-project.org/package=smoother
  license: GPL-2
  summary: A collection of methods for smoothing numerical data, commencing with a port of the
    Matlab gaussian window smoothing function. In addition, several functions typically
    used in smoothing of financial data are included.
  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:
    - MathiasHaudgaard
    - FrodePedersen
    - ArneKr
    - johanneskoester
    - bgruening
    - daler
    - jdblischak
