{% set version = '1.5.1' %}

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

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

source:
  fn: lava_{{ version }}.tar.gz
  url:
    - https://cran.r-project.org/src/contrib/lava_{{ version }}.tar.gz
    - https://cran.r-project.org/src/contrib/Archive/lava/lava_{{ version }}.tar.gz
  sha256: c41da42c9d90d81de876c29bfca736fa111a8924add07c85ab2f8d98200195ed

build:
  number: 0
  skip: true  # [win32]
  rpaths:
    - lib/R/lib/
    - lib/

requirements:
  build:
    - r-base
    - r-numderiv
    - r-survival
  run:
    - r-base
    - r-numderiv
    - r-survival

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

about:
  home: https://github.com/kkholst/lava
  license: GPL-3
  summary: A general implementation of Structural Equation Models with latent variables (MLE,
    2SLS, and composite likelihood estimators) with both continuous, censored, and ordinal
    outcomes (Holst and Budtz-Joergensen (2013) <doi:10.1007/s00180-012-0344-y>). The
    package also provides methods for graph exploration (d-separation, back-door criterion),
    simulation of general non-linear latent variable models, and estimation of influence
    functions for a broad range of statistical  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:
    - cbrueffer
    - johanneskoester
    - bgruening
    - daler
    - jdblischak
