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

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

source:
  fn: cramer_{{ version }}.tar.gz
  url:
    - {{ cran_mirror }}/src/contrib/cramer_{{ version }}.tar.gz
    - {{ cran_mirror }}/src/contrib/Archive/cramer/cramer_{{ version }}.tar.gz
  sha256: 84fbfbcc8897dce2cfd1b0006c91e071a3d71a31006d397608c9b91f71bd8ab6

build:
  merge_build_host: True  # [win]
  number: 1
  skip: true  # [win32]
  rpaths:
    - lib/R/lib/
    - lib/

requirements:
  build:
    - {{posix}}zip               # [win]
  host:
    - r-base
    - r-boot
  run:
    - r-base
    - r-boot

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

about:
  home: https://CRAN.R-project.org/package=cramer
  license: GPL (>= 2)
  summary: Provides R routine for the so called two-sample Cramer-Test.  This nonparametric two-sample-test
    on equality of the underlying distributions can be applied to  multivariate data
    as well as univariate data. It offers two possibilities to approximate the critical
    value both of which  are included in this package.
  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
    - dbast
