{% set version = '0.2.3' %}

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

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

source:
  fn: ggspectra_{{ version }}.tar.gz
  url:
    - https://cran.r-project.org/src/contrib/ggspectra_{{ version }}.tar.gz
    - https://cran.r-project.org/src/contrib/Archive/ggspectra/ggspectra_{{ version }}.tar.gz
  sha256: 98784aa94ef66d572e221b33cd7336bb5b71e35c21fcefda3505fa7e19ddc287

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

requirements:
  build:
    - r-base
    - r-dplyr >=0.7.4
    - r-ggplot2 >=2.2.1
    - r-ggrepel >=0.7.0
    - r-lubridate >=1.7.1
    - r-photobiology >=0.9.18
    - r-photobiologywavebands >=0.4.2
    - r-reshape2 >=1.4.3
    - r-scales >=0.4.1
    - r-tidyr >=0.7.2

  run:
    - r-base
    - r-dplyr >=0.7.4
    - r-ggplot2 >=2.2.1
    - r-ggrepel >=0.7.0
    - r-lubridate >=1.7.1
    - r-photobiology >=0.9.18
    - r-photobiologywavebands >=0.4.2
    - r-reshape2 >=1.4.3
    - r-scales >=0.4.1
    - r-tidyr >=0.7.2

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

about:
  home: https://bitbucket.org/aphalo/ggspectra
  license: GPL (>= 2)
  summary: Additional annotations, and stats for plotting "light" spectra with 'ggplot2', together
    with specializations of ggplot() and plot() methods for spectral data stored in
    objects of the classes defined in package 'photobiology' and a plot() method for
    objects of class "waveband", also defined in package 'photobiology'.
  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:
    - cbrueffer
    - johanneskoester
    - bgruening
    - daler
    - jdblischak
