{% set version = '0.15' %}

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

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

source:
  fn: lhs_{{ version }}.tar.gz
  url:
    - https://cran.r-project.org/src/contrib/lhs_{{ version }}.tar.gz
    - https://cran.r-project.org/src/contrib/Archive/lhs/lhs_{{ version }}.tar.gz
  sha256: bedaf085f735d991457bc5e7137e3149a599b1a767ca328ccf6d33a37bef72ea

build:
  merge_build_host: True  # [win]
  number: 1
  skip: true  # [win32]
  rpaths:
    - lib/R/lib/
    - lib/

requirements:
  build:
    - posix                # [win]
    - {{ compiler('c') }}        # [unix]
    - {{ compiler('m2w64_c') }}  # [win]
    - {{ compiler('cxx') }}        # [unix]
    - {{ compiler('m2w64_cxx') }}  # [win]
  host:
    - r-base
  run:
    - r-base

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

about:
  home: https://CRAN.R-project.org/package=lhs
  license: GPL (>= 2)
  summary: Provides a number of methods for creating and augmenting Latin Hypercube Samples.
  license_family: GPL3
  license_file: '{{ environ["PREFIX"] }}/lib/R/share/licenses/GPL-3'  # [unix]
  license_file: '{{ environ["PREFIX"] }}\R\share\licenses\GPL-3'  # [win]

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