{% set version = '2.0.2' %}

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

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

source:
  fn: SPAtest_{{ version }}.tar.gz
  url:
    - https://cran.r-project.org/src/contrib/SPAtest_{{ version }}.tar.gz
    - https://cran.r-project.org/src/contrib/Archive/SPAtest/SPAtest_{{ version }}.tar.gz
  sha256: 191843f66f626d3279523afddfdc9ad8561184acbd6842cce07d86a6a37c38c0

build:
  number: 0
  skip: true  # [win32 or osx]

  rpaths:
    - lib/R/lib/
    - lib/
requirements:
  build:
    - r-base

  run:
    - r-base

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

about:
  home: https://CRAN.R-project.org/package=SPAtest
  license: GPL (>= 2)
  summary: 'Performs score test using saddlepoint approximation to estimate the null distribution. '

  license_family: GPL3
  license_file: '{{ environ["PREFIX"] }}/lib/R/share/licenses/GPL-3'  # [unix]

extra:
  recipe-maintainers:
    - endrebak
