{% set version = "0.17.1" %}
{% set posix = 'm2-' if win else '' %}

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

source:
  url:
    - {{ cran_mirror }}/src/contrib/rstudioapi_{{ version }}.tar.gz
    - {{ cran_mirror }}/src/contrib/Archive/rstudioapi/rstudioapi_{{ version }}.tar.gz
  sha256: 617ef983c8960673131fb92203fc3c64a7d3787e7479d42daba7acc49b5b3909

build:
  number: 0
  noarch: generic
  rpaths:
    - lib/R/lib/
    - lib/

requirements:
  build:
    - {{ posix }}zip               # [win]
  host:
    - r-base
  run:
    - r-base

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

about:
  home: https://github.com/rstudio/rstudioapi
  license: MIT
  summary: Access the RStudio API (if available) and provide informative error messages when it's not.
  license_family: MIT
  license_file:
    - {{ environ["PREFIX"] }}/lib/R/share/licenses/MIT
    - LICENSE

extra:
  recipe-maintainers:
    - conda-forge/r
    - croth1

# Package: rstudioapi
# Title: Safely Access the RStudio API
# Description: Access the RStudio API (if available) and provide informative error messages when it's not.
# Version: 0.10
# Authors@R: c( person("Kevin", "Ushey", role = c("aut", "cre"), email = "kevin@rstudio.com"), person("JJ", "Allaire", role = c("aut"), email = "jj@rstudio.com"), person("Hadley", "Wickham", role = c("aut"), email = "hadley@rstudio.com"), person("Gary", "Ritchie", role = c("aut"), email = "gary@rstudio.com"), person(family = "RStudio", role = "cph") )
# Maintainer: Kevin Ushey <kevin@rstudio.com>
# License: MIT + file LICENSE
# URL: https://github.com/rstudio/rstudioapi
# BugReports: https://github.com/rstudio/rstudioapi/issues
# RoxygenNote: 6.1.1
# Suggests: testthat, knitr, rmarkdown
# VignetteBuilder: knitr
# Encoding: UTF-8
# NeedsCompilation: no
# Packaged: 2019-03-19 18:45:29 UTC; kevin
# Author: Kevin Ushey [aut, cre], JJ Allaire [aut], Hadley Wickham [aut], Gary Ritchie [aut], RStudio [cph]
# Repository: CRAN
# Date/Publication: 2019-03-19 20:30:03 UTC
