{% set version = '0.3.3' %}

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

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

source:
  fn: GMD_{{ version }}.tar.gz
  url:
    - https://cran.r-project.org/src/contrib/GMD_{{ version }}.tar.gz
    - https://cran.r-project.org/src/contrib/Archive/GMD/GMD_{{ version }}.tar.gz
  sha256: af4e147cb6162bd0608a9006901330a26e85d5c2e6ac5e2ef9f464862b6b504b

build:
  merge_build_host: True  # [win]
  number: 1002
  skip: true  # [win32]

  rpaths:
    - lib/R/lib/
    - lib/

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

  run:
    - r-base
    - r-gplots

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

about:
  home: http://CRAN.R-project.org/package=GMD
  license: GPL (>= 2)
  summary: GMD is a package for non-parametric distance measurement between two discrete frequency
    distributions.
  license_family: GPL3

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