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

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

source:
  url:
    - {{ cran_mirror }}/src/contrib/tsibble_{{ version }}.tar.gz
    - {{ cran_mirror }}/src/contrib/Archive/tsibble/tsibble_{{ version }}.tar.gz
  sha256: 5366f2fd81cddf67f81c2bf8a79b0fd305acc3aae074bd29d8066ed753672b86

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

requirements:
  build:
    - {{ compiler('c') }}        # [not win]
    - {{ compiler('cxx') }}      # [not win]
    - {{native}}toolchain        # [win]
    - {{posix}}filesystem        # [win]
    - {{posix}}make
    - {{posix}}sed               # [win]
    - {{posix}}coreutils         # [win]
    - {{posix}}zip               # [win]
  host:
    - r-base
    - r-rcpp >=0.12.3
    - r-anytime >=0.3.1
    - r-dplyr >=0.7.8
    - r-lubridate
    - r-purrr >=0.2.3
    - r-rlang >=0.2.0
    - r-tibble >=1.4.1
    - r-tidyr
    - r-tidyselect
  run:
    - r-base
    - {{native}}gcc-libs         # [win]
    - r-rcpp >=0.12.3
    - r-anytime >=0.3.1
    - r-dplyr >=0.7.8
    - r-lubridate
    - r-purrr >=0.2.3
    - r-rlang >=0.2.0
    - r-tibble >=1.4.1
    - r-tidyr
    - r-tidyselect

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

about:
  home: https://pkg.earo.me/tsibble
  license: GPL-3
  summary: Provides a 'tbl_ts' class (the 'tsibble') to store and manage temporal data in a data-centric
    format, which is built on top of the 'tibble'. The 'tsibble' aims at easily manipulating
    and analysing temporal data, including counting and filling time gaps, aggregate
    over calendar periods, performing rolling window calculations, and etc.
  license_family: GPL3
  license_file: '{{ environ["PREFIX"] }}/lib/R/share/licenses/GPL-3'

extra:
  recipe-maintainers:
    - johanneskoester
    - bgruening
    - daler
    - jdblischak
    - cbrueffer
    - dbast
    - philip-khor
