{% set version = "0.9.21" %}

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

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

source:
  fn: photobiology_{{ version }}.tar.gz
  url:
    - https://cran.r-project.org/src/contrib/photobiology_{{ version }}.tar.gz
    - https://cran.r-project.org/src/contrib/Archive/photobiology/photobiology_{{ version }}.tar.gz
  sha256: 6c43913679429d70d5c16dee426b403bda9584d008c3ec3cd7d63d27a837a108

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

requirements:
  build:
    - r-base
    - r-catools >=1.17.1
    - r-dplyr >=0.7.4
    - r-lubridate >=1.7.1
    - r-plyr >=1.8.4
    - r-polynom >=1.3_9
    - r-rlang >=0.1.4
    - r-splus2r >=1.2_2
    - r-tibble >=1.3.4

  run:
    - r-base
    - r-catools >=1.17.1
    - r-dplyr >=0.7.4
    - r-lubridate >=1.7.1
    - r-plyr >=1.8.4
    - r-polynom >=1.3_9
    - r-rlang >=0.1.4
    - r-splus2r >=1.2_2
    - r-tibble >=1.3.4

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

about:
  home: https://bitbucket.org/aphalo/photobiology
  license: GPL (>= 2)
  summary: Definitions of classes, methods, operators and functions for use in photobiology and
    radiation meteorology and climatology. Calculation of effective (weighted) and not-weighted
    irradiances/doses, fluence rates, transmittance, reflectance, absorptance, absorbance
    and diverse ratios and other derived quantities from spectral data. Local maxima
    and minima. Conversion between energy- and photon-based units. Wavelength interpolation.
    Astronomical calculations related solar angles and day length. Colours and vision.
  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
