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

package:
  name: r-operator.tools
  version: {{ version|replace("-", "_") }}

source:
  fn: operator.tools_{{ version }}.tar.gz
  url:
    - {{ cran_mirror }}/src/contrib/operator.tools_{{ version }}.tar.gz
    - {{ cran_mirror }}/src/contrib/Archive/operator.tools/operator.tools_{{ version }}.tar.gz
  sha256: e5b74018fb75bfa02820dec4b822312f1640422f01d9fec1b58d880ffb798dec

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

requirements:
  build:
    - {{posix}}zip               # [win]
  host:
    - r-base
  run:
    - r-base

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

about:
  home: https://github.com/decisionpatterns/operator.tools
  license: GPL-2
  summary: 'Provides a collection of utilities that allow programming with  R''s operators. Routines
    allow classifying operators,  translating to and from an operator and its underlying
    function, and inverting  some operators (e.g. comparison operators), etc. All methods
    can be extended to custom infix operators. '
  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:
    - johanneskoester
    - bgruening
    - daler
    - jdblischak
    - cbrueffer
