{% set version = '0.9-1' %}

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

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

source:
  fn: biglm_{{ version }}.tar.gz
  url:
    - https://cran.r-project.org/src/contrib/biglm_{{ version }}.tar.gz
    - https://cran.r-project.org/src/contrib/Archive/biglm/biglm_{{ version }}.tar.gz
  sha256: e189554913a3b162c8be04e7d0d8143eb4da0fcec56113cb1ce99f42fc22f0fc

build:
  number: 0
  skip: true  # [win32]

  rpaths:
    - lib/R/lib/
    - lib/

requirements:
  build:
    - r-base
    - r-dbi
    - posix                # [win]
    - {{native}}toolchain  # [win]
    - gcc                  # [not win]

  run:
    - r-base
    - r-dbi
    - libgcc  # [not win]

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

about:
  home: https://CRAN.R-project.org/package=biglm
  license: GPL
  summary: Regression for data too large to fit in memory
  license_family: GPL

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