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

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

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

source:
  fn: nor1mix_{{ version }}.tar.gz
  url:
    - https://cran.r-project.org/src/contrib/nor1mix_{{ version }}.tar.gz
    - https://cran.r-project.org/src/contrib/Archive/nor1mix/nor1mix_{{ version }}.tar.gz
  sha256: 435e6519e832ef5229c51ccb2619640e6b50dfc7470f70f0c938d18a114273af

build:
  number: 0
  skip: true  # [win32]

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

requirements:
  build:
    - r-base

  run:
    - r-base

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

about:
  home: https://CRAN.R-project.org/package=nor1mix
  license: GPL (>= 2)
  summary: Onedimensional Normal Mixture Models Classes, for, e.g., density estimation or clustering
    algorithms research and teaching; providing the widely used Marron-Wand densities.  Efficient
    random number generation and graphics; now fitting to data by ML (Maximum Likelihood)
    or EM estimation.
  license_family: GPL3

extra:
  recipe-maintainers:
    - johanneskoester
    - bgruening
    - daler
    - jdblischak
