{% set version = '1.2-2' %}

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

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

source:
  fn: pwr_{{ version }}.tar.gz
  url:
    - https://cran.r-project.org/src/contrib/pwr_{{ version }}.tar.gz
    - https://cran.r-project.org/src/contrib/Archive/pwr/pwr_{{ version }}.tar.gz
  sha256: 550f021c2ff675ebdcd08116d01ea2073164f289f541ffc7dde7984c033aaf64

build:
  number: 0
  skip: true  # [win32]
  rpaths:
    - lib/R/lib/
    - lib/

requirements:
  build:
    - r-base

  run:
    - r-base

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

about:
  home: https://github.com/heliosdrm/pwr
  license: GPL (>= 3)
  summary: Power analysis functions along the lines of Cohen (1988).
  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
    - cbrueffer
