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

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

source:
  fn: vars_{{ version }}.tar.gz
  url:
    - {{ cran_mirror }}/src/contrib/vars_{{ version }}.tar.gz
    - {{ cran_mirror }}/src/contrib/Archive/vars/vars_{{ version }}.tar.gz
  sha256: 86afa75dff18f6b0d4c044d6fafde6f817e3e4732a0c8b10b029507a04da867d

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-mass
    - r-lmtest >=0.9_26
    - r-sandwich >=2.2_4
    - r-strucchange
    - r-urca >=1.1_6
  run:
    - r-base
    - r-mass
    - r-lmtest >=0.9_26
    - r-sandwich >=2.2_4
    - r-strucchange
    - r-urca >=1.1_6

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

about:
  home: http://www.pfaffikus.de
  license: GPL (>= 2)
  summary: Estimation, lag selection, diagnostic testing, forecasting, causality analysis, forecast
    error variance decomposition and impulse response functions of VAR models and estimation
    of SVAR and SVEC models.
  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
