{% set version = '2.3' %}

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

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

source:
  fn: ggm_{{ version }}.tar.gz
  url:
    - https://cran.r-project.org/src/contrib/ggm_{{ version }}.tar.gz
    - https://cran.r-project.org/src/contrib/Archive/ggm/ggm_{{ version }}.tar.gz

  sha256: 832ffe81ff87c6f1a6644e689ebbfb172924b4c4584ac8108d1244d153219ed8

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

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

requirements:
  build:
    - r-base
    - r-igraph

  run:
    - r-base
    - r-igraph

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

about:
  home: https://CRAN.R-project.org/package=ggm
  license: GPL (>= 2)
  summary: Functions and datasets for maximum likelihood fitting of some classes of graphical
    Markov models.
  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:
    - MathiasHaudgaard
    - FrodePedersen
    - ArneKr
    - Johanneskoester
    - Bgruening
    - Daler
    - Jdblischak
