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

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

source:
  fn: semTools_{{ version }}.tar.gz
  url:
    - {{ cran_mirror }}/src/contrib/semTools_{{ version }}.tar.gz
    - {{ cran_mirror }}/src/contrib/Archive/semTools/semTools_{{ version }}.tar.gz
  sha256: d0fad6d3d5f858b19509940a017ec68d77bf2d00824775869d18491542b16a2a

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

requirements:
  build:
  host:
    - r-base
    - r-lavaan >=0.6.1
  run:
    - r-base
    - r-lavaan >=0.6.1

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

about:
  home: https://github.com/simsem/semTools/wiki
  license: GPL (>= 2)
  summary: Provides useful tools for structural equation modeling.
  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
