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

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

source:
  fn: proxy_{{ version }}.tar.gz
  url:
    - {{ cran_mirror }}/src/contrib/proxy_{{ version }}.tar.gz
    - {{ cran_mirror }}/src/contrib/Archive/proxy/proxy_{{ version }}.tar.gz
  sha256: aa866ccbfc81253e3651963b5ba482feeb5d1a0449e818486271d79a23720e50

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

requirements:
  build:
    - {{ compiler('c') }}        # [not win]
    - {{native}}toolchain        # [win]
    - {{posix}}filesystem        # [win]
    - {{posix}}make
    - {{posix}}sed               # [win]
    - {{posix}}coreutils         # [win]
    - {{posix}}zip               # [win]
  host:
    - r-base
  run:
    - r-base
    - {{native}}gcc-libs         # [win]

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

about:
  home: https://CRAN.R-project.org/package=proxy
  license: GPL-2
  summary: 'Provides an extensible framework for the efficient calculation of auto- and cross-proximities,
    along with implementations of the most popular ones. '
  license_family: GPL2
  license_file: '{{ environ["PREFIX"] }}/lib/R/share/licenses/GPL-2'

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