{% set version = '0.6-7' %}

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

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

source:
  fn: relations_{{ version }}.tar.gz
  url:
    - https://cran.r-project.org/src/contrib/relations_{{ version }}.tar.gz
    - https://cran.r-project.org/src/contrib/Archive/relations/relations_{{ version }}.tar.gz
  sha256: a270f3fe2f124e5238ce18b93b916d2d874434a6f1470e59b484d8b2c9d226b0

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

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

requirements:
  build:
    - r-base
    - r-cluster
    - r-sets >=1.0_16
    - r-slam

  run:
    - r-base
    - r-cluster
    - r-sets >=1.0_16
    - r-slam

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

about:
  home: https://CRAN.R-project.org/package=relations
  license: GPL-2
  summary: Data structures and algorithms for k-ary relations with arbitrary domains, featuring
    relational algebra, predicate functions, and fitters for consensus relations.
  license_family: GPL2

extra:
  recipe-maintainers:
    - dpryan79
    - johanneskoester
    - bgruening
    - daler
    - jdblischak
