{% set version = '0.5-9' %}

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

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

source:
  fn: brglm_{{ version }}.tar.gz
  url:
    - https://cran.r-project.org/src/contrib/brglm_{{ version }}.tar.gz
    - https://cran.r-project.org/src/contrib/Archive/brglm/brglm_{{ version }}.tar.gz
  sha256: 5b70bc8216d1af37304e5e7c6e902b92327cc2aad5798ea6ba1634dfab921d92

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

requirements:
  build:
    - r-base
    - r-profilemodel
    - posix                # [win]
    - {{native}}toolchain  # [win]
    - gcc                  # [not win]

  run:
    - r-base
    - r-profilemodel

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

about:
  home: http://www.ucl.ac.uk/~ucakiko/index.html
  license: GPL (>= 2)
  summary: Fit generalized linear models with binomial responses using either an adjusted-score
    approach to bias reduction or maximum penalized likelihood where penalization is
    by Jeffreys invariant prior. These procedures return estimates with improved frequentist
    properties (bias, mean squared error) that are always finite even in cases where
    the maximum likelihood estimates are infinite (data separation). Fitting takes place
    by fitting generalized linear models on iteratively updated pseudo-data. The interface
    is essentially the same as 'glm'.  More flexibility is provided by the fact that
    custom pseudo-data representations can be specified and used for model fitting.
    Functions are provided for the construction of confidence intervals for the reduced-bias
    estimates.
  license_family: GPL3

extra:
  recipe-maintainers:
    - johanneskoester
    - bgruening
