{% set version = '0.1.4' %}

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

source:
  fn: natserv_{{ version }}.tar.gz
  url:
    - https://cran.r-project.org/src/contrib/natserv_{{ version }}.tar.gz
    - https://cran.r-project.org/src/contrib/Archive/natserv/natserv_{{ version }}.tar.gz
  sha256: 07501608a2e79b20940cd0e22aca9db6150942eed5b6dad184ec957e153d8e63

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

requirements:
  build:
    - r-base
    - r-crul >=0.2.0
    - r-data.table >=1.10.0
    - r-tibble >=1.2
    - r-xml2 >=1.0.0
  run:
    - r-base
    - r-crul >=0.2.0
    - r-data.table >=1.10.0
    - r-tibble >=1.2
    - r-xml2 >=1.0.0

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

about:
  home: https://cran.r-project.org/web/packages/natserv
  license: MIT
  license_file: LICENSE
  summary: Interface to 'NatureServe'

extra:
  recipe-maintainers:
    - ocefpaf
