{% set version = '1.1.1' %}

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

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

source:
  fn: rex_{{ version }}.tar.gz
  url:
    - https://cran.r-project.org/src/contrib/rex_{{ version }}.tar.gz
    - https://cran.r-project.org/src/contrib/Archive/rex/rex_{{ version }}.tar.gz
  sha256: 6c821ed7e68ccf791b60f3d6d30a9e8081b3d8470967afda10e8404170cfd0db

build:
  number: 0
  skip: true  # [win32]

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

requirements:
  build:
    - r-base
    - r-lazyeval
    - r-magrittr

  run:
    - r-base
    - r-lazyeval
    - r-magrittr

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

about:
  home: https://github.com/kevinushey/rex
  license: MIT
  summary: A friendly interface for the construction of regular expressions.
  license_family: MIT

extra:
  recipe-maintainers:
    - johanneskoester
    - bgruening
