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

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

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

source:
  fn: lsmeans_{{ version }}.tar.gz
  url:
    - https://cran.r-project.org/src/contrib/lsmeans_{{ version }}.tar.gz
    - https://cran.r-project.org/src/contrib/Archive/lsmeans/lsmeans_{{ version }}.tar.gz
  sha256: 7c332a972bb3f261e484256f494289c388cc1eda1c86669a404193017eba3cce

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

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

requirements:
  build:
    - r-base
    - r-coda >=0.17
    - r-estimability
    - r-multcomp
    - r-mvtnorm
    - r-nlme
    - r-plyr
    - r-xtable >=1.8_2

  run:
    - r-base
    - r-coda >=0.17
    - r-estimability
    - r-multcomp
    - r-mvtnorm
    - r-nlme
    - r-plyr
    - r-xtable >=1.8_2

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

about:
  home: https://CRAN.R-project.org/package=lsmeans
  license: GPL (>= 2)
  summary: Obtain least-squares means for many linear, generalized linear,  and mixed models.
    Compute contrasts or linear functions of least-squares means, and comparisons of
    slopes. Plots and compact letter displays.
  license_family: GPL3

extra:
  recipe-maintainers:
    - johanneskoester
    - bgruening
