{% set version = '0.4.3' %}

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

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

source:
  fn: munsell_{{ version }}.tar.gz
  url:
    - https://cran.r-project.org/src/contrib/munsell_{{ version }}.tar.gz
    - https://cran.r-project.org/src/contrib/Archive/munsell/munsell_{{ version }}.tar.gz
  sha256: 397c3c90af966f48eebe8f5d9e40c41b17541f0baaa102eec3ea4faae5a2bd49

build:
  number: 0
  skip: true  # [win32]
  rpaths:
    - lib/R/lib/
    - lib/

requirements:
  build:
    - r-base
    - r-colorspace

  run:
    - r-base
    - r-colorspace

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

about:
  home: https://CRAN.R-project.org/package=munsell
  license: MIT
  summary: Provides easy access to, and manipulation of, the Munsell  colours. Provides a mapping
    between Munsell's  original notation (e.g. "5R 5/10") and hexadecimal strings suitable  for
    use directly in R graphics. Also provides utilities  to explore slices through the
    Munsell colour tree, to transform  Munsell colours and display colour palettes.
  license_family: MIT

extra:
  recipe-maintainers:
    - johanneskoester
    - bgruening
