{% set version = '1.2' %}

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

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

source:
  fn: ibd_{{ version }}.tar.gz
  url:
    - https://cran.r-project.org/src/contrib/ibd_{{ version }}.tar.gz
    - https://cran.r-project.org/src/contrib/Archive/ibd/ibd_{{ version }}.tar.gz
  sha256: ba860bc0389646755cdb2109f9adea6aadaeca1d9c01d384f42799fee8d90119

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

  rpaths:
    - lib/R/lib/
    - lib/
requirements:
  build:
    - r-base
    - r-mass
    - r-car
    - r-lpsolve
    - r-lsmeans
    - r-multcompview

  run:
    - r-base
    - r-mass
    - r-car
    - r-lpsolve
    - r-lsmeans
    - r-multcompview

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

about:
  home: https://CRAN.R-project.org/package=ibd
  license: GPL (>= 2)
  summary: This package contains several utility functions related to incomplete block designs.
    The package contains function to generate efficient incomplete block designs with
    given numbers of treatments, blocks and block size. The package also contains function
    to generate an incomplete block design with specified concurrence matrix. There
    are functions to generate balanced treatment incomplete block designs and incomplete
    block designs for test versus control treatments comparisons with specified concurrence
    matrix. Package also allows performing analysis of variance of data and computing
    least square means of factors from experiments using a connected incomplete block
    design. Tests of hypothesis of treatment contrasts in incomplete block design set
    up is supported.
  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
