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

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

source:
  fn: TH.data_{{ version }}.tar.gz
  url:
    - {{ cran_mirror }}/src/contrib/TH.data_{{ version }}.tar.gz
    - {{ cran_mirror }}/src/contrib/Archive/TH.data/TH.data_{{ version }}.tar.gz
  sha256: d8318a172ce2b9f7f284dc297c8a8d5093de8eccbb566c8e7580e70938dfae0f

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

requirements:
  build:
    - {{posix}}zip               # [win]
  host:
    - r-base
    - r-mass
    - r-survival
  run:
    - r-base
    - r-mass
    - r-survival

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

about:
  home: https://CRAN.R-project.org/package=TH.data
  license: GPL-3
  summary: Contains data sets used in other packages Torsten Hothorn maintains.
  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
    - dbast
