{% set version = '1.1.2' %}
{% 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:
    - {{ cran_mirror }}/src/contrib/rex_{{ version }}.tar.gz
    - {{ cran_mirror }}/src/contrib/Archive/rex/rex_{{ version }}.tar.gz
  sha256: bd3c74ceaf335336f5dd04314d0a791f6311e421a2158f321f5aab275f539a2a

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

requirements:
  build:
    - {{posix}}zip               # [win]
  host:
    - 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
    - daler
    - jdblischak
    - cbrueffer
