{% set version = '1.8-8' %}

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

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

source:
  fn: HiddenMarkov_{{ version }}.tar.gz
  url:
    - https://cran.r-project.org/src/contrib/HiddenMarkov_{{ version }}.tar.gz
    - https://cran.r-project.org/src/contrib/Archive/HiddenMarkov/HiddenMarkov_{{ version }}.tar.gz
  sha256: d7519168fe1f725bdb1b29b106ceca858dee51fad1f04426b321f9c93a4eab8d

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

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

requirements:
  build:
    - r-base
    - posix                # [win]
    - {{native}}toolchain  # [win]
    - gcc                  # [not win]

  run:
    - r-base
    - libgcc  # [not win]

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

about:
  home: ftp://ftp.gns.cri.nz/pub/davidh/sslib/r-repo/
  license: GPL (>= 2)
  summary: Contains functions for the analysis of Discrete Time Hidden Markov Models, Markov
    Modulated GLMs and the Markov Modulated Poisson Process. It includes functions for
    simulation, parameter estimation, and the Viterbi algorithm. See the topic "HiddenMarkov"
    for an introduction to the package, and "Change Log" for a list of recent changes.
    The algorithms are based of those of Walter Zucchini.
  license_family: GPL
  license_file: '{{ environ["PREFIX"] }}/lib/R/share/licenses/GPL-3'   # [unix]
  license_file: '{{ environ["PREFIX"] }}\R\share\licenses\GPL-3'   # [win]

extra:
  recipe-maintainers:
    - sebastian-luna-valero
    - johanneskoester
    - bgruening
    - daler
    - jdblischak
