{% set version = '1.0-4' %}

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

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

source:
  fn: blme_{{ version }}.tar.gz
  url:
    - https://cran.r-project.org/src/contrib/blme_{{ version }}.tar.gz
    - https://cran.r-project.org/src/contrib/Archive/blme/blme_{{ version }}.tar.gz
  sha256: c2bfc6b7804cdc1f1b95cd6ce215a13a7c7aa5833ad9cfe8900e4c44045842b1

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

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

requirements:
  build:
    - r-base
    - r-lme4 >=1.0_6

  run:
    - r-base
    - r-lme4 >=1.0_6

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

about:
  home: https://github.com/vdorie/blme
  license: GPL (>= 2)
  summary: Maximum a posteriori estimation for linear and generalized linear mixed-effects models
    in a Bayesian setting. Extends 'lme4' by Douglas Bates, Martin Maechler, Ben Bolker,
    and Steve Walker.
  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
    - ccwang002
