{% set version = '0.4.1' %}

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

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

source:
  fn: weatherData_{{ version }}.tar.gz
  url:
    - https://cran.r-project.org/src/contrib/weatherData_{{ version }}.tar.gz
    - https://cran.r-project.org/src/contrib/Archive/weatherData/weatherData_{{ version }}.tar.gz
  sha256: 8c42b735eefcea2c0db1372a4fc199d7702169aa7811a7b82ac12b51785ad6a7

build:
  number: 0
  skip: true  # [win32]

  rpaths:
    - lib/R/lib/
    - lib/

requirements:
  build:
    - r-base
    - r-plyr

  run:
    - r-base
    - r-plyr

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

about:
  home: http://ram-n.github.io/weatherData/
  license: GPL
  summary: Functions that help in fetching weather data from websites. Given a location and a
    date range, these functions help fetch weather data (temperature, pressure etc.)
    for any weather related analysis.
  license_family: GPL

extra:
  recipe-maintainers:
    - johanneskoester
    - bgruening
