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

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

source:
  fn: formula.tools_{{ version }}.tar.gz
  url:
    - {{ cran_mirror }}/src/contrib/formula.tools_{{ version }}.tar.gz
    - {{ cran_mirror }}/src/contrib/Archive/formula.tools/formula.tools_{{ version }}.tar.gz
  sha256: 4fe0e72d9d96f2398e86cbd8536d0c84de38e5583d4ff7dcd73f415ddd8ca395

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

requirements:
  build:
    - {{posix}}zip               # [win]
  host:
    - r-base
    - r-operator.tools >=1.4.0
  run:
    - r-base
    - r-operator.tools >=1.4.0

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

about:
  home: https://github.com/decisionpatterns/formula.tools
  license: GPL-2
  summary: 'These utilities facilitate the programmatic manipulations of formulas, expressions,
    calls, assignments and other R language objects.  These objects all share the same
    structure: a left-hand side, operator and  right-hand side. This packages provides
    methods for accessing and  modifying this structures as well as extracting and replacing
    names and  symbols from these objects.'
  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
