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

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

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

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

  sha256: 6556580c7b781b35786f8f7b1db6e321881bf16963195111241c296856889991

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

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

requirements:
  build:
    - r-base
    - r-mass

  run:
    - r-base
    - r-mass

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

about:
  home: https://cran.r-project.org/web/packages/smoothmest/index.html
  license: GPL
  summary: Some M-estimators for 1-dimensional location (Bisquare, ML for the Cauchy distribution,
    and the estimators from application of the smoothing principle introduced in Hampel,
    Hennig and Ronchetti (2011) to the above, the Huber M-estimator, and the median,
    main function is smoothm), and Pitman estimator.
  license_family: GPL
extra:
   recipe-maintainers:
    - MathiasHaudgaard
    - FrodePedersen
    - ArneKr
    - johanneskoester
    - bgruening
    - daler
    - jdblischak
