{% set version = '0.8.5' %}

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

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

source:
  fn: jmvcore_{{ version }}.tar.gz
  url:
    - https://cran.r-project.org/src/contrib/jmvcore_{{ version }}.tar.gz
    - https://cran.r-project.org/src/contrib/Archive/jmvcore/jmvcore_{{ version }}.tar.gz
  sha256: 7d86a44d806c3295afd24d45b5dbbde7d7e67c92b6c6b3ffac51a195310a2d70

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

requirements:
  build:
    - r-base
    - r-r6 >=1.0.1
    - r-base64enc
    - r-rjson

  run:
    - r-base
    - r-r6 >=1.0.1
    - r-base64enc
    - r-rjson

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

about:
  home: https://www.jamovi.org
  license: GPL (>= 2)
  summary: 'A framework for creating rich interactive analyses for the jamovi platform
    (see <https://www.jamovi.org> for more information).'
  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
