{% set version = '1.1-7' %}

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

source:
  fn: osmar_{{ version }}.tar.gz
  url:
    - https://cran.r-project.org/src/contrib/osmar_{{ version }}.tar.gz
    - https://cran.r-project.org/src/contrib/Archive/osmar/osmar_{{ version }}.tar.gz
  sha256: 79c4c149a44c4220ca02e97f9675e2bf90de04124c5663ba5d009576b845cd60

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

requirements:
  build:
    - r-base
    - r-rcurl
    - r-xml
    - r-geosphere
  run:
    - r-base
    - r-rcurl
    - r-xml
    - r-geosphere

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

about:
  home: https://cran.r-project.org/web/packages/osmar
  license: GPL-2
  summary: This package provides infrastructure to access OpenStreetMap data from different sources,
    to work with the data in common R manner, and to convert data into available infrastructure
    provided by existing R packages (e.g., into sp and igraph objects).

extra:
  recipe-maintainers:
    - ocefpaf
