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

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

source:
  url:
    - {{ cran_mirror }}/src/contrib/keyring_{{ version }}.tar.gz
    - {{ cran_mirror }}/src/contrib/Archive/keyring/keyring_{{ version }}.tar.gz
  sha256: 8c78b6a6aa5f08a368eb7b7cd1cfad76c724136a0ec26f618fd855cd7c121fe7

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

requirements:
  build:
    - {{ compiler('c') }}        # [not win]
    - {{ compiler('m2w64_c') }}        # [win]
    - {{ posix }}filesystem        # [win]
    - {{ posix }}sed               # [win]
    - {{ posix }}grep              # [win]
    - {{ posix }}autoconf
    - {{ posix }}automake          # [not win]
    - {{ posix }}automake-wrapper  # [win]
    - {{ posix }}pkg-config
    - {{ posix }}make
    - {{ posix }}coreutils         # [win]
    - {{ posix }}zip               # [win]
  host:
    - libsecret  # [linux]
    - r-base
    - r-r6
    - r-assertthat
    - r-filelock
    - r-getpass
    - r-openssl
    - r-rappdirs
    - r-sodium
    - r-yaml
  run:
    - r-base
    - {{ native }}gcc-libs         # [win]
    - r-r6
    - r-assertthat
    - r-filelock
    - r-getpass
    - r-openssl
    - r-rappdirs
    - r-sodium
    - r-yaml

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

about:
  home: https://github.com/r-lib/keyring#readme
  license: MIT
  summary: "Platform independent 'API' to access the operating system's credential store. Currently supports: 'Keychain' on 'macOS', Credential Store on 'Windows', the Secret Service 'API' on 'Linux', and a simple, platform independent store implemented with environment variables. Additional storage back-ends can be added\
    \ easily."
  license_family: MIT

  license_file:
    - {{ environ["PREFIX"] }}/lib/R/share/licenses/MIT
    - LICENSE
extra:
  recipe-maintainers:
    - conda-forge/r
    - halldc

# Package: keyring
# Title: Access the System Credential Store from R
# Version: 1.1.0
# Authors@R:  c(person(given = "Gabor", family = "Csardi", role = c("aut", "cre"), email = "csardi.gabor@gmail.com"), person("RStudio", role = "cph"))
# Description: Platform independent 'API' to access the operating system's credential store. Currently supports: 'Keychain' on 'macOS', Credential Store on 'Windows', the Secret Service 'API' on 'Linux', and a simple, platform independent store implemented with environment variables. Additional storage back-ends can be added easily.
# License: MIT + file LICENSE
# LazyData: true
# URL: https://github.com/r-lib/keyring#readme
# BugReports: https://github.com/r-lib/keyring/issues
# RoxygenNote: 6.0.1
# Imports: assertthat, getPass, openssl, R6, utils, sodium, yaml, filelock, rappdirs, tools
# Suggests: callr, covr, mockery, testthat, withr
# Encoding: UTF-8
# SystemRequirements: Optional: libsecret on Linux (libsecret-1-dev on Debian/Ubuntu, libsecret-devel on Fedora/CentOS)
# Collate: 'api.R' 'assertions.R' 'backend-class.R' 'backend-env.R' 'backend-file.R' 'backend-macos.R' 'backend-secret-service.R' 'backend-wincred.R' 'default_backend.R' 'package.R' 'pass.R' 'utils.R'
# NeedsCompilation: yes
# Packaged: 2018-07-16 11:55:49 UTC; gaborcsardi
# Author: Gabor Csardi [aut, cre], RStudio [cph]
# Maintainer: Gabor Csardi <csardi.gabor@gmail.com>
# Repository: CRAN
# Date/Publication: 2018-07-16 12:20:03 UTC
