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

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

source:
  fn: estimability_{{ version }}.tar.gz
  url:
    - {{ cran_mirror }}/src/contrib/estimability_{{ version }}.tar.gz
    - {{ cran_mirror }}/src/contrib/Archive/estimability/estimability_{{ version }}.tar.gz
  sha256: a33179c5fbd6a1a623d90cb6f1743148f92c09429fac466867f3ea70946a2e32

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

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

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

about:
  home: https://CRAN.R-project.org/package=estimability
  license: GPL (>= 3)
  summary: Provides tools for determining estimability of linear functions  of regression coefficients,
    and 'epredict' methods that handle  non-estimable cases correctly. Estimability
    theory is discussed in many linear-models textbooks including Chapter 3 of Monahan,
    JF (2008),  "A Primer on Linear Models", Chapman and Hall (ISBN 978-1-4200-6201-4).
  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
