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

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

source:
  fn: pals_{{ version }}.tar.gz
  url:
    - {{ cran_mirror }}/src/contrib/pals_{{ version }}.tar.gz
    - {{ cran_mirror }}/src/contrib/Archive/pals/pals_{{ version }}.tar.gz
  sha256: 11b68688d18e4034436c7b2f6c11d0b23ae4b609331cbfb1a80dee1b116f847d

build:
  merge_build_host: True  # [win]
  number: 0
  # no r-rgl package for OSX
  skip: true  # [win32 or osx]
  rpaths:
    - lib/R/lib/
    - lib/

requirements:
  build:
    - {{posix}}zip               # [win]
  host:
    - r-base
    - r-colorspace
    - r-dichromat
    - r-mapproj
    - r-maps
    - r-rgl
  run:
    - r-base
    - r-colorspace
    - r-dichromat
    - r-mapproj
    - r-maps
    - r-rgl

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

about:
  home: https://github.com/kwstat/pals
  license: GPL-3
  summary: A comprehensive collection of color palettes, colormaps, and tools to evaluate them.
  license_family: GPL3
  license_file: '{{ environ["PREFIX"] }}/lib/R/share/licenses/GPL-3'  # [unix]
  license_file: '{{ environ["PREFIX"] }}\R\share\licenses\GPL-3'  # [win]

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