{% set version = '0.4-14' %}

{% 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:
    - https://cran.r-project.org/src/contrib/semTools_{{ version }}.tar.gz
    - https://cran.r-project.org/src/contrib/Archive/semTools/semTools_{{ version }}.tar.gz
  sha256: 0c24e4e2db46529e6270d1a2fbb6422be7da9e048e2600180229926055852cc8

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

requirements:
  build:
    - r-base
    - r-lavaan >=0.5_22

  run:
    - r-base
    - r-lavaan >=0.5_22

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 packages.
  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
