{% set version = '1.0.19' %}

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

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

source:
  fn: bbmle_{{ version }}.tar.gz
  url:
    - https://cran.r-project.org/src/contrib/bbmle_{{ version }}.tar.gz
    - https://cran.r-project.org/src/contrib/Archive/bbmle/bbmle_{{ version }}.tar.gz
  sha256: e882d7401126ae1a965e5e8d612c12441f45e9f10d9d2b3453643f1378359004

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

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

requirements:
  build:
    - r-base
    - r-mass
    - r-lattice
    - r-numderiv

  run:
    - r-base
    - r-mass
    - r-lattice
    - r-numderiv

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

about:
  home: https://CRAN.R-project.org/package=bbmle
  license: GPL
  summary: Methods and functions for fitting maximum likelihood models in R. This package modifies
    and extends the 'mle' classes in the 'stats4' package.
  license_family: GPL

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