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

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

source:
  fn: validate_{{ version }}.tar.gz
  url:
    - {{ cran_mirror }}/src/contrib/validate_{{ version }}.tar.gz
    - {{ cran_mirror }}/src/contrib/Archive/validate/validate_{{ version }}.tar.gz
  sha256: 4da2bbd1d3c3372694cbb79bc3a28735ec569630ef5860fd9778300126764d29

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

requirements:
  build:
    - {{ compiler('c') }}        # [not win]
    - {{native}}toolchain        # [win]
    - {{posix}}filesystem        # [win]
    - {{posix}}make
    - {{posix}}sed               # [win]
    - {{posix}}coreutils         # [win]
    - {{posix}}zip               # [win]
  host:
    - r-base
    - r-settings
    - r-yaml
  run:
    - r-base
    - {{native}}gcc-libs         # [win]
    - r-settings
    - r-yaml

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

about:
  home: https://github.com/data-cleaning/validate
  license: GPL-3
  summary: Declare data validation rules and data quality indicators; confront data with them
    and analyze or visualize the results. The package supports rules that are per-field,
    in-record, cross-record or cross-dataset. Rules can be automatically analyzed for
    rule type and connectivity.
  license_family: GPL3
  license_file: '{{ environ["PREFIX"] }}/lib/R/share/licenses/GPL-3'

extra:
  recipe-maintainers:
    - johanneskoester
    - bgruening
    - daler
    - jdblischak
    - cbrueffer
    - dbast
