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

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

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

source:
  fn: binhf_{{ version }}.tar.gz
  url:
    - https://cran.r-project.org/src/contrib/binhf_{{ version }}.tar.gz
    - https://cran.r-project.org/src/contrib/Archive/binhf/binhf_{{ version }}.tar.gz
  sha256: 33d1a9f29aa9bd7123a092f8b6d61c2fca8e9e80df1ceb8e175b562357110951

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

  rpaths:
    - lib/R/lib/
    - lib/
requirements:
  build:
    - r-base
    - r-adlift >=0.9.2
    - r-wavethresh

  run:
    - r-base
    - r-adlift >=0.9.2
    - r-wavethresh

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

about:
  home: https://CRAN.R-project.org/package=binhf
  license: GPL (>= 2)
  summary: Binomial Haar-Fisz transforms for Gaussianization
  license_family: GPL3
  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
