{% set version = '1.1.3' %}

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

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

source:
  fn: glm2_{{ version }}.tar.gz
  url:
    - https://cran.r-project.org/src/contrib/glm2_{{ version }}.tar.gz
    - https://cran.r-project.org/src/contrib/Archive/glm2/glm2_{{ version }}.tar.gz

  sha256: 5ddcac683f89be6067c030e4be326f9fd320715c527b01a6a8d357c6825abb56

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

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

requirements:
  build:
    - r-base

  run:
    - r-base

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

about:
  home: https://CRAN.R-project.org/package=glm2
  license: GPL (>= 2)
  summary: Fits generalized linear models using the same model specification as glm in the stats
    package, but with a modified default fitting method that provides greater stability
    for models that may fail to converge using glm.
  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:
    - MathiasHaudgaard
    - FrodePedersen
    - ArneKr
    - Johanneskoester
    - Bgruening
    - Daler
    - Jdblischak
