{% set version = '0.3-0' %}

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

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

source:
  fn: pspearman_{{ version }}.tar.gz
  url:
    - https://cran.r-project.org/src/contrib/pspearman_{{ version }}.tar.gz
    - https://cran.r-project.org/src/contrib/Archive/pspearman/pspearman_{{ version }}.tar.gz
  sha256: 9d19ecb03b8d9a4f31618fd806a1c752e376b5ee81ae97b6a9db9675d4c3b5d0

build:
  merge_build_host: True  # [win]
  number: 1003
  rpaths:
    - lib/R/lib/
    - lib/

requirements:
  build:
    - posix                # [win]
    - {{ compiler('c') }}        # [unix]
    - {{ compiler('m2w64_c') }}  # [win]
  host:
    - r-base

  run:
    - r-base

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

about:
  home: https://CRAN.R-project.org/package=pspearman
  license: GPL-3
  summary: Spearman's rank correlation test with precomputed exact null distribution for n <= 22.
  license_family: GPL3
  license_file: '{{ environ["PREFIX"] }}/lib/R/share/licenses/GPL-3'

extra:
  recipe-maintainers:
    - conda-forge/r
    - johanneskoester
    - bgruening
    - daler
    - jdblischak
    - cbrueffer
