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

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

source:
  fn: Formula_{{ version }}.tar.gz
  url:
    - {{ cran_mirror }}/src/contrib/Formula_{{ version }}.tar.gz
    - {{ cran_mirror }}/src/contrib/Archive/Formula/Formula_{{ version }}.tar.gz
  sha256: 1411349b20bd09611a9fd0ee6d15f780c758ad2b0e490e908facb49433823872

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('Formula')"           # [not win]
    - "\"%R%\" -e \"library('Formula')\""  # [win]

about:
  home: https://CRAN.R-project.org/package=Formula
  license: GPL-2 | GPL-3
  summary: Infrastructure for extended formulas with multiple parts on the right-hand side and/or
    multiple responses on the left-hand side (see <DOI:10.18637/jss.v034.i01>).
  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:
    - johanneskoester
    - bgruening
    - daler
    - jdblischak
    - cbrueffer
    - dbast
