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

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

source:
  url:
    - {{ cran_mirror }}/src/contrib/slider_{{ version }}.tar.gz
    - {{ cran_mirror }}/src/contrib/Archive/slider/slider_{{ version }}.tar.gz
  sha256: 1c2f92a1589d69ccd61694701614db2593e5047d1beb738c72c8323c1c8232ca

build:
  merge_build_host: true  # [win]
  number: 1
  rpaths:
    - lib/R/lib/
    - lib/

requirements:
  build:
    - {{ compiler('c') }}              # [not win]
    - {{ compiler('m2w64_c') }}        # [win]
    - {{ posix }}filesystem        # [win]
    - {{ posix }}make
    - {{ posix }}sed               # [win]
    - {{ posix }}coreutils         # [win]
    - {{ posix }}zip               # [win]
  host:
    - r-base
    - r-glue
    - r-rlang >=0.4.5
    - r-vctrs >=0.2.4
    - r-warp
  run:
    - r-base
    - {{ native }}gcc-libs         # [win]
    - r-glue
    - r-rlang >=0.4.5
    - r-vctrs >=0.2.4
    - r-warp

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

about:
  home: https://github.com/DavisVaughan/slider
  license: MIT
  summary: Provides type-stable rolling window functions over any R data type. Cumulative and expanding windows are also supported. For more advanced usage, an index can be used as a secondary vector that defines how sliding windows are to be created.
  license_family: MIT
  license_file:
    - {{ environ["PREFIX"] }}/lib/R/share/licenses/MIT
    - LICENSE

extra:
  recipe-maintainers:
    - mxr-conda
    - conda-forge/r
    - oblute
    - rluria14

# Package: slider
# Title: Sliding Window Functions
# Version: 0.1.2
# Authors@R: c(person(given = "Davis", family = "Vaughan", role = c("aut", "cre"), email = "davis@rstudio.com"), person(given = "RStudio", role = "cph"))
# Description: Provides type-stable rolling window functions over any R data type. Cumulative and expanding windows are also supported. For more advanced usage, an index can be used as a secondary vector that defines how sliding windows are to be created.
# License: MIT + file LICENSE
# URL: https://github.com/DavisVaughan/slider
# BugReports: https://github.com/DavisVaughan/slider/issues
# Depends: R (>= 3.2)
# Imports: glue, rlang (>= 0.4.5), vctrs (>= 0.2.4), warp
# Suggests: covr, dplyr (>= 0.8.3), knitr, lubridate, rmarkdown, testthat (>= 2.1.0), xml2
# LinkingTo: vctrs (>= 0.2.4)
# VignetteBuilder: knitr
# Encoding: UTF-8
# LazyData: true
# RoxygenNote: 7.0.2
# Collate: 'block.R' 'conditions.R' 'hop-common.R' 'hop-index-common.R' 'hop-index.R' 'hop-index2.R' 'hop.R' 'hop2.R' 'names.R' 'phop-index.R' 'phop.R' 'slide-index2.R' 'pslide-index.R' 'slide-period2.R' 'pslide-period.R' 'slide2.R' 'pslide.R' 'slide-common.R' 'slide-index-common.R' 'slide-index.R' 'slide-period-common.R' 'slide-period.R' 'slide.R' 'slider-package.R' 'utils.R' 'zzz.R'
# NeedsCompilation: yes
# Packaged: 2020-03-10 14:50:35 UTC; davis
# Author: Davis Vaughan [aut, cre], RStudio [cph]
# Maintainer: Davis Vaughan <davis@rstudio.com>
# Repository: CRAN
# Date/Publication: 2020-03-10 15:10:02 UTC
