{% set version = '0.7.1' %}

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

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

source:
  fn: shinyFiles_{{ version }}.tar.gz
  url:
    - https://cran.r-project.org/src/contrib/shinyFiles_{{ version }}.tar.gz
    - https://cran.r-project.org/src/contrib/Archive/shinyFiles/shinyFiles_{{ version }}.tar.gz

  sha256: 35eb6fec64ad5f3662ef65ea4f61cc9f823b0ebaa94a4c567feb0b7e68026fb1

build:
  number: 0
  skip: true  # [win32]

  rpaths:
    - lib/R/lib/
    - lib/

requirements:
  build:
    - r-base
    - r-fs >=1.2.6
    - r-htmltools
    - r-jsonlite
    - r-shiny >=1.1.0
    - r-tibble >=1.4.2

  run:
    - r-base
    - r-fs >=1.2.6
    - r-htmltools
    - r-jsonlite
    - r-shiny >=1.1.0
    - r-tibble >=1.4.2

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

about:
  home: https://CRAN.R-project.org/package=shinyFiles
  license: GPL (>= 2)
  summary: Provides functionality for client-side navigation of the server side file system in
    shiny apps. In case the app is running locally this gives the user direct access
    to the file system without the need to "download" files to a temporary location.
    Both file and folder selection as well as file saving is available.
  license_family: GPL3
extra:
   recipe-maintainers:
    - dpryan79
    - MathiasHaudgaard
    - FrodePedersen
    - ArneKr
    - johanneskoester
    - bgruening
    - daler
    - jdblischak
