{% set version = '0.1.7' %}

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

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

source:
  fn: gsmoothr_{{ version }}.tar.gz
  url:
    - https://cran.r-project.org/src/contrib/gsmoothr_{{ version }}.tar.gz
    - https://cran.r-project.org/src/contrib/Archive/gsmoothr/gsmoothr_{{ version }}.tar.gz
  sha256: b75ffd2a4a0f357762e02e46e355b45cc90ea637830f0a1b01f216bb4541e903

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('gsmoothr')"  # [not win]
    - "\"%R%\" -e \"library('gsmoothr')\""  # [win]

about:
  home: https://CRAN.R-project.org/package=gsmoothr
  license: LGPL (>= 2.0)
  summary: Tools rewritten in C for various smoothing tasks
  license_family: LGPL

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