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

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

source:
  fn: sda_{{ version }}.tar.gz
  url:
    - {{ cran_mirror }}/src/contrib/sda_{{ version }}.tar.gz
    - {{ cran_mirror }}/src/contrib/Archive/sda/sda_{{ version }}.tar.gz
  sha256: 57320a1f9d486af9f1c51af9a5da43137dc8aea769869f17ca5f4169afb913ec

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

requirements:
  build:
    - {{posix}}zip               # [win]
  host:
    - r-base
    - r-corpcor >=1.6.8
    - r-entropy >=1.2.1
    - r-fdrtool >=1.2.15
  run:
    - r-base
    - r-corpcor >=1.6.8
    - r-entropy >=1.2.1
    - r-fdrtool >=1.2.15

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

about:
  home: http://strimmerlab.org/software/sda/
  license: GPL (>= 3)
  summary: Provides an efficient framework for  high-dimensional linear and diagonal discriminant
    analysis with  variable selection.  The classifier is trained using James-Stein-type  shrinkage
    estimators and predictor variables are ranked using  correlation-adjusted t-scores
    (CAT scores).  Variable selection error  is controlled using false non-discovery
    rates or higher criticism.
  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:
    - dpryan79
    - johanneskoester
    - bgruening
    - daler
    - jdblischak
    - cbrueffer
    - dbast
