{% set version = '2.0.0' %}

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

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

source:
  url:
    - {{ cran_mirror }}/src/contrib/rematch_{{ version }}.tar.gz
    - {{ cran_mirror }}/src/contrib/Archive/rematch/rematch_{{ version }}.tar.gz
  sha256: 15daf7bf2907aef8503635bc8631fce9fd75248a1fc2496825588c4bdf785c26

build:
  merge_build_host: True  # [win]
  # If this is a new build for the same version, increment the build number.
  number: 0
  # no skip
  noarch: generic

  # This is required to make R link correctly on Linux.
  rpaths:
    - lib/R/lib/
    - lib/

# Suggests: covr, testthat
requirements:
  build:
    - {{ posix }}zip               # [win]

  host:
    - r-base

  run:
    - r-base

test:
  commands:
    # You can put additional test commands to be run here.
    - $R -e "library('rematch')"           # [not win]
    - "\"%R%\" -e \"library('rematch')\""  # [win]

  # You can also put a file called run_test.py, run_test.sh, or run_test.bat
  # in the recipe that will be run at test time.

  # requires:
    # Put any additional test requirements here.

about:
  home: https://github.com/gaborcsardi/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
  license_file:
    - '{{ environ["PREFIX"] }}/lib/R/share/licenses/MIT'
    - LICENSE

extra:
  recipe-maintainers:
    - johanneskoester
    - bgruening
    - mingwandroid

# The original CRAN metadata for this package was:

# Package: rematch
# Title: Match Regular Expressions with a Nicer 'API'
# Version: 2.0.0
# Author: Gabor Csardi
# Maintainer: Gabor Csardi <csardi.gabor@gmail.com>
# Description: A small wrapper on 'regexpr' to extract the matches and captured groups from the match of a regular expression to a character vector.
# License: MIT + file LICENSE
# URL: https://github.com/gaborcsardi/rematch
# BugReports: https://github.com/gaborcsardi/rematch/issues
# RoxygenNote: 5.0.1.9000
# Suggests: covr, testthat
# Encoding: UTF-8
# NeedsCompilation: no
# Packaged: 2023-08-30 12:10:51 UTC; gaborcsardi
# Repository: CRAN
# Date/Publication: 2023-08-30 16:50:02 UTC

# See
# https://docs.conda.io/projects/conda-build for
# more information about meta.yaml
