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

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

source:
  fn: spacetime_{{ version }}.tar.gz
  url:
    - {{ cran_mirror }}/src/contrib/spacetime_{{ version }}.tar.gz
    - {{ cran_mirror }}/src/contrib/Archive/spacetime/spacetime_{{ version }}.tar.gz
  sha256: 1e9d3f92e5c4614a69c82a58bf0b5c829b4ed262bf1250bef943ae286056ea2d

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

requirements:
  build:
    - {{posix}}zip               # [win]
  host:
    - r-base
    - r-intervals
    - r-lattice
    - r-sp >=1.1_0
    - r-xts >=0.8_8
    - r-zoo >=1.7_9
  run:
    - r-base
    - r-intervals
    - r-lattice
    - r-sp >=1.1_0
    - r-xts >=0.8_8
    - r-zoo >=1.7_9

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

about:
  home: http://github.com/edzer/spacetime
  license: GPL (>= 2)
  summary: Classes and methods for spatio-temporal data, including space-time regular lattices,
    sparse lattices, irregular data, and trajectories; utility functions for plotting
    data as map sequences (lattice or animation) or multiple time series; methods for
    spatial and temporal selection and subsetting, as well as for spatial/temporal/spatio-temporal
    matching or aggregation, retrieving coordinates, print, summary, etc.
  license_family: GPL3
  license_file: '{{ environ["PREFIX"] }}/lib/R/share/licenses/GPL-3'  # [unix]
  license_file: '{{ environ["PREFIX"] }}\R\share\licenses\GPL-3'  # [win]

extra:
  recipe-maintainers:
    - jsignell
    - johanneskoester
    - bgruening
    - daler
    - jdblischak
    - cbrueffer
    - dbast
