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

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

source:
  fn: mitml_{{ version }}.tar.gz
  url:
    - {{ cran_mirror }}/src/contrib/mitml_{{ version }}.tar.gz
    - {{ cran_mirror }}/src/contrib/Archive/mitml/mitml_{{ version }}.tar.gz
  sha256: 8bcfeb18f3fb8a58a516348c37369eb8356af4bd3e0688c84a2366e1534608e9

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

requirements:
  build:
  host:
    - r-base
    - r-haven
    - r-jomo
    - r-pan
  run:
    - r-base
    - r-haven
    - r-jomo
    - r-pan

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

about:
  home: https://CRAN.R-project.org/package=mitml
  license: GPL (>= 2)
  summary: Provides tools for multiple imputation of missing data in multilevel modeling. Includes
    a user-friendly interface to the packages 'pan' and 'jomo', and several functions
    for visualization, data management and the analysis  of multiply imputed data sets.
  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
