{% set version = "1.4-1" %}

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

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

source:
  fn: adlift_{{ version }}.tar.gz
  url:
    - https://cran.r-project.org/src/contrib/adlift_{{ version }}.tar.gz
    - https://cran.r-project.org/src/contrib/Archive/adlift/adlift_{{ version }}.tar.gz
  sha256: c35d78591014ebb5fc51c980bae8cd3a10f19baa0e36289d85ad6f4ca1750793

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

  rpaths:
    - lib/R/lib/
    - lib/
requirements:
  build:
    - r-base
    - r-ebayesthresh
    - posix                # [win]
    - {{native}}toolchain  # [win]
    - gcc                  # [not win]

  run:
    - r-base
    - r-ebayesthresh
    - libgcc  # [not win]

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

about:
  home: https://CRAN.R-project.org/package=adlift
  license: GPL-2.0 and GPL-3.0
  summary: Adaptive wavelet lifting transforms for signal denoising using optimal local neighbourhood
    regression, from Nunes et al. (2006) <doi:10.1007/s11222-006-6560-y>.
  license_family: GPL
  license_file: '{{ environ["PREFIX"] }}/lib/R/share/licenses/GPL-3'  # [unix]
  license_file: '{{ environ["PREFIX"] }}\R\share\licenses\GPL-3'  # [win]

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