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

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

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

source:
  fn: cghFLasso_{{ version }}.tar.gz
  url:
    - https://cran.r-project.org/src/contrib/cghFLasso_{{ version }}.tar.gz
    - https://cran.r-project.org/src/contrib/Archive/cghFLasso/cghFLasso_{{ version }}.tar.gz
  sha256: 6e697959b35a3ceb2baa1542ef81f0335006a5a9c937f0173c6483979cb4302c

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

about:
  home: https://CRAN.R-project.org/package=cghFLasso
  license: GPL (>= 2)
  summary: Spatial smoothing and hot spot detection using the fused lasso regression
  license_family: GPL3

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