{% set version = '1.2-5' %}

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

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

source:
  fn: AER_{{ version }}.tar.gz
  url:
    - https://cran.r-project.org/src/contrib/AER_{{ version }}.tar.gz
    - https://cran.r-project.org/src/contrib/Archive/AER/AER_{{ version }}.tar.gz
  sha256: ef0cf14ff9d3de2b97e5855243426cc918808eb1011f0e2253b3b00043927a62

build:
  number: 0
  skip: true  # [win32]
  rpaths:
    - lib/R/lib/
    - lib/

requirements:
  build:
    - r-base
    - r-formula >=0.2_0
    - r-car >=2.0_19
    - r-lmtest
    - r-sandwich
    - r-survival >=2.37_5
    - r-zoo
  run:
    - r-base
    - r-formula >=0.2_0
    - r-car >=2.0_19
    - r-lmtest
    - r-sandwich
    - r-survival >=2.37_5
    - r-zoo

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

about:
  home: https://CRAN.R-project.org/package=AER
  license: GPL (>= 2)
  summary: |
    Functions, data sets, examples, demos, and vignettes for the book Christian Kleiber
    and Achim Zeileis (2008), Applied Econometrics with R, Springer-Verlag, New York.
    ISBN 978-0-387-77316-2. (See the vignette "AER" for a package overview.)
  license_family: GPL3

extra:
  recipe-maintainers:
    - johanneskoester
    - bgruening
