{% set version = "1.1" %}

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

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

source:
  fn: kriging_{{ version }}.tar.gz
  url:
    - https://cran.r-project.org/src/contrib/kriging_{{ version }}.tar.gz
    - https://cran.r-project.org/src/contrib/Archive/kriging/kriging_{{ version }}.tar.gz
  sha256: bc20a08af3e6175836985cb0763cca20faf32f4190e6b779a656b8fcc8c87d11

build:
  merge_build_host: true  # [win]
  number: 1003
  skip: true  # [win32]

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

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

  run:
    - r-base

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

about:
  home: https://CRAN.R-project.org/package=kriging
  license: GPL-2.0-only
  summary: Simple and highly optimized ordinary kriging algorithm to plot geographical data
  license_family: GPL2

  license_file:
    - {{ environ["PREFIX"] }}/lib/R/share/licenses/GPL-2
extra:
  recipe-maintainers:
    - conda-forge/r
    - johanneskoester
    - bgruening
    - daler
    - jdblischak
