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

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

source:
  fn: bigstep_{{ version }}.tar.gz
  url:
    - {{ cran_mirror }}/src/contrib/bigstep_{{ version }}.tar.gz
    - {{ cran_mirror }}/src/contrib/Archive/bigstep/bigstep_{{ version }}.tar.gz
  sha256: c5fe0b04478ac45af7dfdff3d6d6da5e47f83391faee8ed6d861b7aaec73853c

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

requirements:
  build:
    - {{posix}}zip               # [win]
  host:
    - r-base
    - r-r.utils
    - r-rcppeigen
    - r-bigmemory
    - r-matrixstats
    - r-speedglm
  run:
    - r-base
    - r-r.utils
    - r-rcppeigen
    - r-bigmemory
    - r-matrixstats
    - r-speedglm

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

about:
  home: http://github.com/pmszulc/bigstep
  license: GPL-3
  summary: Selecting linear and generalized linear models for large data sets using modified
    stepwise procedure and modern selection criteria (like modifications of Bayesian
    Information Criterion). Selection can be performed on data which exceed RAM capacity.
    Special selection strategy is available, faster than classical stepwise procedure.
  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
