{% set version = '0.5.4' %}

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

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

source:
  fn: survMisc_{{ version }}.tar.gz
  url:
    - https://cran.r-project.org/src/contrib/survMisc_{{ version }}.tar.gz
    - https://cran.r-project.org/src/contrib/Archive/survMisc/survMisc_{{ version }}.tar.gz
  sha256: 0431f3c919cde20c58be77f362e58ee1c2d9913405fc7a42802090d9a1dd44d4

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

requirements:
  build:
    - r-base
    - r-kmsurv
    - r-data.table
    - r-ggplot2
    - r-gridextra
    - r-km.ci
    - r-knitr
    - r-survival
    - r-xtable
    - r-zoo

  run:
    - r-base
    - r-kmsurv
    - r-data.table
    - r-ggplot2
    - r-gridextra
    - r-km.ci
    - r-knitr
    - r-survival
    - r-xtable
    - r-zoo

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

about:
  home: https://CRAN.R-project.org/package=survMisc
  license: GPL-2
  summary: A collection of functions to help in the analysis of right-censored survival data.
    These extend the methods available in package:survival.
  license_family: GPL2
  license_file: '{{ environ["PREFIX"] }}/lib/R/share/licenses/GPL-2'  # [unix]
  license_file: '{{ environ["PREFIX"] }}\R\share\licenses\GPL-2'  # [win]

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