{% set version = '1.3-4' %}

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

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

source:
  fn: maxLik_{{ version }}.tar.gz
  url:
    - https://cran.r-project.org/src/contrib/maxLik_{{ version }}.tar.gz
    - https://cran.r-project.org/src/contrib/Archive/maxLik/maxLik_{{ version }}.tar.gz
  sha256: 181ab87721b1e6e3859c60d12eea2f67a7135bfa679db73c20a9ef76d82c4b4a

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

  rpaths:
    - lib/R/lib/
    - lib/
requirements:
  build:
    - r-base
    - r-misctools >=0.6_8
    - r-sandwich

  run:
    - r-base
    - r-misctools >=0.6_8
    - r-sandwich

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

about:
  home: http://www.maxLik.org
  license: GPL (>= 2)
  summary: Functions for Maximum Likelihood (ML) estimation and non-linear optimization, and
    related tools.  It includes a unified way to call different optimizers, and classes
    and methods to handle the results from the ML viewpoint.  It also includes a number
    of convenience tools for testing and developing your own models.
  license_family: GPL3

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