{% set version = '1.0.1' %}

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

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

source:
  fn: rematch_{{ version }}.tar.gz
  url:
    - https://cran.r-project.org/src/contrib/rematch_{{ version }}.tar.gz
    - https://cran.r-project.org/src/contrib/Archive/rematch/rematch_{{ version }}.tar.gz
  sha256: a409dec978cd02914cdddfedc974d9b45bd2975a124d8870d52cfd7d37d47578

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

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

requirements:
  build:
    - r-base

  run:
    - r-base

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

about:
  home: https://github.com/MangoTheCat/rematch
  license: MIT
  summary: A small wrapper on 'regexpr' to extract the matches and captured groups from the match
    of a regular expression to a character vector.
  license_family: MIT

extra:
  recipe-maintainers:
    - johanneskoester
    - bgruening
