{% set version = '5.0-2' %}

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

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

source:
  fn: gamlss_{{ version }}.tar.gz
  url:
    - https://cran.r-project.org/src/contrib/gamlss_{{ version }}.tar.gz
    - https://cran.r-project.org/src/contrib/Archive/gamlss/gamlss_{{ version }}.tar.gz
  sha256: a4bdb99f96bda565331448bb63cb4a1debc184b98394a03f4e85d30cc7b3e7d0

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

  rpaths:
    - lib/R/lib/
    - lib/
requirements:
  build:
    - r-base
    - r-mass
    - r-gamlss.data >=5.0_0
    - r-gamlss.dist >=4.3.1
    - r-nlme
    - r-survival
    - posix                # [win]
    - {{native}}toolchain  # [win]
    - gcc                  # [not win]

  run:
    - r-base
    - r-mass
    - r-gamlss.data >=5.0_0
    - r-gamlss.dist >=4.3.1
    - r-nlme
    - r-survival
    - libgcc  # [not win]

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

about:
  home: http://www.gamlss.org/
  license: GPL-2 | GPL-3
  summary: Functions for fitting Generalized Additive Models for Location Scale and Shape.
  license_family: GPL3

extra:
  recipe-maintainers:
    - johanneskoester
    - bgruening
    - daler
