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

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

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

source:
  fn: gnm_{{ version }}.tar.gz
  url:
    - https://cran.r-project.org/src/contrib/gnm_{{ version }}.tar.gz
    - https://cran.r-project.org/src/contrib/Archive/gnm/gnm_{{ version }}.tar.gz
  sha256: 8a062364cf85f92f436cacbbb80e8a9185c4ce5ba11f9cb3027eecb0e6a70195

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

requirements:
  build:
    - r-base
    - r-mass
    - r-matrix
    - r-nnet
    - r-qvcalc >=0.8_3
    - r-relimp
    - posix                # [win]
    - {{native}}toolchain  # [win]
    - gcc                  # [not win]

  run:
    - r-base
    - r-mass
    - r-matrix
    - r-nnet
    - r-qvcalc >=0.8_3
    - r-relimp
    - libgcc  # [not win]

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

about:
  home: http://go.warwick.ac.uk/gnm
  license: GPL-2 | GPL-3
  summary: Functions to specify and fit generalized nonlinear models, including models with multiplicative
    interaction terms such as the UNIDIFF model from sociology and the AMMI model from
    crop science, and many others.  Over-parameterized representations of models are
    used throughout; functions are provided for inference on estimable parameter combinations,
    as well as standard methods for diagnostics etc.
  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
