{% set version = "2.8-6" %}
{% set posix = 'm2-' if win else '' %}
{% set native = 'm2w64-' if win else '' %}

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

source:
  url:
    - {{ cran_mirror }}/src/contrib/openair_{{ version }}.tar.gz
    - {{ cran_mirror }}/src/contrib/Archive/openair/openair_{{ version }}.tar.gz
  sha256: 37ffd9d6c5f5cebcd95720c6599f25f2e6c4fd3f6134f6aec026cb671ea373c0

build:
  merge_build_host: true  # [win]
  number: 0
  rpaths:
    - lib/R/lib/
    - lib/

requirements:
  build:
    - {{ compiler('c') }}              # [not win]
    - {{ compiler('m2w64_c') }}        # [win]
    - {{ compiler('cxx') }}            # [not win]
    - {{ compiler('m2w64_cxx') }}      # [win]
    - {{ posix }}filesystem        # [win]
    - {{ posix }}make
    - {{ posix }}sed               # [win]
    - {{ posix }}coreutils         # [win]
    - {{ posix }}zip               # [win]
    - cross-r-base {{ r_base }}    # [build_platform != target_platform]
  host:
    - r-base
    - r-mass
    - r-rcpp
    - r-cluster
    - r-dplyr >=1.0
    - r-hexbin
    - r-lattice
    - r-latticeextra
    - r-lubridate
    - r-mapproj
    - r-mgcv
    - r-purrr
    - r-readr
    - r-rlang
    - r-tidyr
  run:
    - r-base
    - {{ native }}gcc-libs         # [win]
    - r-mass
    - r-rcpp
    - r-cluster
    - r-dplyr >=1.0
    - r-hexbin
    - r-lattice
    - r-latticeextra
    - r-lubridate
    - r-mapproj
    - r-mgcv
    - r-purrr
    - r-readr
    - r-rlang
    - r-tidyr

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

about:
  home: https://davidcarslaw.github.io/openair/
  license: GPL-2.0-or-later
  summary: Tools to analyse, interpret and understand air pollution data. Data are typically hourly time series and both monitoring data and dispersion model output can be analysed.  Many functions can also be applied to other data, including meteorological and traffic data.
  license_family: GPL2
  license_file:
    - {{ environ["PREFIX"] }}/lib/R/share/licenses/GPL-2

extra:
  recipe-maintainers:
    - conda-forge/r
    - mfansler

# Package: openair
# Type: Package
# Title: Tools for the Analysis of Air Pollution Data
# Version: 2.8-3
# Date: 2021-03-16
# Authors@R: c(person("David", "Carslaw", role = c("aut", "cre"), email = "david.carslaw@york.ac.uk"), person("Karl", "Ropkins", role = "aut", email = "K.Ropkins@its.leeds.ac.uk"))
# ByteCompile: true
# Depends: R (>= 3.2.0),
# Imports: grid, rlang, dplyr (>= 1.0), purrr, tidyr, readr, mgcv, lattice, latticeExtra, lubridate, cluster, mapproj, hexbin, Rcpp, grDevices, graphics, methods, stats, MASS, utils
# Suggests: KernSmooth, maps, mapdata, quantreg
# LinkingTo: Rcpp
# Maintainer: David Carslaw <david.carslaw@york.ac.uk>
# Description: Tools to analyse, interpret and understand air pollution data. Data are typically hourly time series and both monitoring data and dispersion model output can be analysed.  Many functions can also be applied to other data, including meteorological and traffic data.
# License: GPL (>= 2)
# URL: https://davidcarslaw.github.io/openair/
# BugReports: https://github.com/davidcarslaw/openair/issues
# LazyLoad: yes
# LazyData: yes
# Encoding: UTF-8
# RoxygenNote: 7.1.1
# NeedsCompilation: yes
# Packaged: 2021-03-16 14:57:25 UTC; davidcarslaw
# Author: David Carslaw [aut, cre], Karl Ropkins [aut]
# Repository: CRAN
# Date/Publication: 2021-03-16 19:20:03 UTC
