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

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

source:
  fn: ggsci_{{ version }}.tar.gz
  url:
    - {{ cran_mirror }}/src/contrib/ggsci_{{ version }}.tar.gz
    - {{ cran_mirror }}/src/contrib/Archive/ggsci/ggsci_{{ version }}.tar.gz
  sha256: 4af14e6f3657134c115d5ac5e65a2ed74596f9a8437c03255447cd959fe9e33c

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

requirements:
  build:
    - {{posix}}zip               # [win]
  host:
    - r-base
    - r-ggplot2 >=2.0.0
    - r-scales
  run:
    - r-base
    - r-ggplot2 >=2.0.0
    - r-scales

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

about:
  home: https://nanx.me/ggsci/, https://github.com/road2stat/ggsci
  license: GPL-3
  summary: A collection of 'ggplot2' color palettes inspired by plots in scientific journals,
    data visualization libraries, science fiction movies, and TV shows.
  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
    - dbast
