{% set version = '0.10.2' %}

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

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

source:
  fn: globals_{{ version }}.tar.gz
  url:
    - https://cran.r-project.org/src/contrib/globals_{{ version }}.tar.gz
    - https://cran.r-project.org/src/contrib/Archive/globals/globals_{{ version }}.tar.gz
  sha256: 8d12fef5450cbb1f64eb278f8c2da7973ed28e958501885af862757a2538dcc8

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

  rpaths:
    - lib/R/lib/
    - lib/
requirements:
  build:
    - r-base
    - r-codetools

  run:
    - r-base
    - r-codetools

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

about:
  home: https://github.com/HenrikBengtsson/globals
  license: LGPL (>= 2.1)
  summary: Identifies global ("unknown" or "free") objects in R expressions by code inspection
    using various strategies, e.g. conservative or liberal. The objective of this package
    is to make it as simple as possible to identify global objects for the purpose of
    exporting them in distributed compute environments.
  license_family: LGPL

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