{% set version = '0.5-2' %}

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

package:
  name: r-km.ci
  version: {{ version|replace("-", "_") }}

source:
  fn: km.ci_{{ version }}.tar.gz
  url:
    - https://cran.r-project.org/src/contrib/km.ci_{{ version }}.tar.gz
    - https://cran.r-project.org/src/contrib/Archive/km.ci/km.ci_{{ version }}.tar.gz
  sha256: 1bb9c60e27ba42ea773407dcc438b4a630f53877eb16e6054041a97b25e2d3d0

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

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

  run:
    - r-base
    - r-survival

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

about:
  home: https://CRAN.R-project.org/package=km.ci
  license: GPL (>= 2)
  summary: |
    Computes various confidence intervals for the Kaplan-Meier estimator, namely: Petos
    CI, Rothman CI, CI''s based on Greenwoods variance, Thomas and Grunkemeier CI and
    the simultaneous confidence bands by Nair and Hall and Wellner.
  license_family: GPL3

extra:
  recipe-maintainers:
    - johanneskoester
    - bgruening
    - daler
    - jdblischak
