{% set version = '1.2-3' %}

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

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

source:
  fn: Lmoments_{{ version }}.tar.gz
  url:
    - https://cran.r-project.org/src/contrib/Lmoments_{{ version }}.tar.gz
    - https://cran.r-project.org/src/contrib/Archive/Lmoments/Lmoments_{{ version }}.tar.gz
  sha256: e974b65d6116d540bc2c934c40c5552f64d7781b77c259a5b7724b1338c9e08e

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

  rpaths:
    - lib/R/lib/
    - lib/
requirements:
  build:
    - r-base

  run:
    - r-base

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

about:
  home: http://www.tilastotiede.fi/juha_karvanen.html
  license: GPL-2
  summary: Contains functions to estimate L-moments and trimmed L-moments from the data. Also
    contains functions to estimate the parameters of the normal polynomial quantile
    mixture and the Cauchy polynomial quantile mixture from L-moments and trimmed L-moments.
  license_family: GPL2
  license_file: '{{ environ["PREFIX"] }}/lib/R/share/licenses/GPL-2'  # [unix]
  license_file: '{{ environ["PREFIX"] }}\R\share\licenses\GPL-2'  # [win]

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