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

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

source:
  fn: entropy_{{ version }}.tar.gz
  url:
    - {{ cran_mirror }}/src/contrib/entropy_{{ version }}.tar.gz
    - {{ cran_mirror }}/src/contrib/Archive/entropy/entropy_{{ version }}.tar.gz
  sha256: edb27144b8f855f1ef21de6b93b6b6c5cf7d4f2c3d592bf625e5158c02226f83

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

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

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

about:
  home: http://strimmerlab.org/software/entropy/
  license: GPL (>= 3)
  summary: This package implements various estimators of entropy, such as the shrinkage estimator
    by Hausser and Strimmer, the maximum likelihood  and the Millow-Madow estimator,
    various Bayesian estimators, and the  Chao-Shen estimator.  It also offers an R
    interface to the NSB estimator. Furthermore, it provides functions for estimating
    Kullback-Leibler divergence, chi-squared, mutual information, and chi-squared statistic
    of independence. In addition there are functions for discretizing continuous random
    variables.
  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
