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

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

source:
  fn: superpc_{{ version }}.tar.gz
  url:
    - {{ cran_mirror }}/src/contrib/superpc_{{ version }}.tar.gz
    - {{ cran_mirror }}/src/contrib/Archive/superpc/superpc_{{ version }}.tar.gz
  sha256: 3f991a5ac577c8fd72255d993b4f82729767b3cb8e70f148b1a7dc63c5a37ddc

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-survival
  run:
    - r-base
    - r-survival

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

about:
  home: http://www-stat.stanford.edu/~tibs/superpc
  license: GPL-2
  summary: Supervised principal components for regression and survival analsysis. Especially
    useful for high-dimnesional data, including microarray data.
  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:
    - johanneskoester
    - bgruening
    - daler
    - jdblischak
    - cbrueffer
