{% set version = '1.9-3' %}

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

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

source:
  fn: arm_{{ version }}.tar.gz
  url:
    - https://cran.r-project.org/src/contrib/arm_{{ version }}.tar.gz
    - https://cran.r-project.org/src/contrib/Archive/arm/arm_{{ version }}.tar.gz
  sha256: 1cefcc1d82431f1b3ed014ff04dd087fd0da3396df5a25144ffa80a8d01fe700

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

requirements:
  build:
    - r-base
    - r-mass
    - r-matrix >=1.0
    - r-abind
    - r-coda
    - r-lme4 >=1.0
    - r-nlme

  run:
    - r-base
    - r-mass
    - r-matrix >=1.0
    - r-abind
    - r-coda
    - r-lme4 >=1.0
    - r-nlme

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

about:
  home: https://CRAN.R-project.org/package=arm
  license: GPL (>= 3)
  summary: Functions to accompany A. Gelman and J. Hill, Data Analysis Using Regression and Multilevel/Hierarchical
    Models, Cambridge University Press, 2007.
  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:
    - ThimotheeV
    - johanneskoester
    - bgruening
    - daler
    - jdblischak
    - cbrueffer
