{% set version = "0.4.2" %}

package:
  name: r-rerddap
  version: {{ version }}

source:
  fn: rerddap-{{ version }}.tar.gz
  url:
    - https://cran.r-project.org/src/contrib/rerddap_{{ version }}.tar.gz
    - https://cran.r-project.org/src/contrib/Archive/rerddap/rerddap_{{ version }}.tar.gz
  sha256: 89887d7f8cb16484ade92ac104e8106d9fd73ac24d45e5a1b1d8122b2576c54a

build:
  number: 0
  skip: True  # [win32]
  script: R CMD INSTALL --build .
  rpaths:
    - lib/R/lib/
    - lib/

requirements:
  build:
    - r-base
    - r-httr >=1.2.1
    - r-dplyr >=0.5.0
    - r-data.table >=1.10.0
    - r-jsonlite >=1.2
    - r-xml2 >=1.1.0
    - r-digest
    - r-ncdf4 >=1.15
    - r-tibble
    - r-hoardr >=0.2.0
  run:
    - r-base
    - r-httr >=1.2.1
    - r-dplyr >=0.5.0
    - r-data.table >=1.10.0
    - r-jsonlite >=1.2
    - r-xml2 >=1.1.0
    - r-digest
    - r-ncdf4 >=1.15
    - r-tibble
    - r-hoardr >=0.2.0

test:
  commands:
    - R -e "library('rerddap')"  # [not win]
    - R -e \"library('rerddap')\"  # [win]
    - conda inspect linkages -p $PREFIX r-rerddap  # [not win]
    - conda inspect objects -p $PREFIX r-rerddap  # [osx]

about:
  home: https://github.com/ropensci/rerddap
  license: MIT
  license_file: LICENSE
  summary: "General purpose R client for 'ERDDAP' servers. Includes functions to search for
    'datasets', get summary information on 'datasets', and fetch 'datasets', in
    either 'csv' or 'netCDF' format. 'ERDDAP' information: http://upwell.pfeg.noaa.gov/erddap/information.html."

extra:
  recipe-maintainers:
    - ocefpaf
