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

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

source:
  url:
    - {{ cran_mirror }}/src/contrib/askpass_{{ version }}.tar.gz
    - {{ cran_mirror }}/src/contrib/Archive/askpass/askpass_{{ version }}.tar.gz
  sha256: db40827d1bdbb90c0aa2846a2961d3bf9d76ad1b392302f9dd84cc2fd18c001f

build:
  merge_build_host: True  # [win]
  number: 2
  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-sys >=2.1
  run:
    - r-base
    - {{ native }}gcc-libs         # [win]
    - r-sys >=2.1

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

about:
  home: https://github.com/jeroen/askpass#readme
  license: MIT
  summary: 'Cross-platform utilities for prompting the user for credentials or a  passphrase,
    for example to authenticate with a server or read a protected key. Includes native
    programs for MacOS and Windows, hence no ''tcltk'' is required.  Password entry
    can be invoked in two different ways: directly from R via the  askpass() function,
    or indirectly as password-entry back-end for ''ssh-agent''  or ''git-credential''
    via the ssh_askpass and git_askpass environment variables. Thereby the user can
    be prompted for credentials or a passphrase if needed  when R calls out to git or
    ssh.'
  license_family: MIT
  license_file:
    - '{{ environ["PREFIX"] }}/lib/R/share/licenses/MIT'
    - LICENSE

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

# Package: askpass
# Type: Package
# Title: Safe Password Entry for R, Git, and SSH
# Version: 1.1
# Authors@R: person("Jeroen", "Ooms", role = c("aut", "cre"),  email = "jeroen@berkeley.edu", comment = c(ORCID = "0000-0002-4035-0289"))
# Description: Cross-platform utilities for prompting the user for credentials or a  passphrase, for example to authenticate with a server or read a protected key. Includes native programs for MacOS and Windows, hence no 'tcltk' is required.  Password entry can be invoked in two different ways: directly from R via the  askpass() function, or indirectly as password-entry back-end for 'ssh-agent'  or 'git-credential' via the ssh_askpass and git_askpass environment variables. Thereby the user can be prompted for credentials or a passphrase if needed  when R calls out to git or ssh.
# License: MIT + file LICENSE
# URL: https://github.com/jeroen/askpass#readme
# BugReports: https://github.com/jeroen/askpass/issues
# Encoding: UTF-8
# LazyData: true
# Imports: sys (>= 2.1)
# RoxygenNote: 6.1.1
# Suggests: testthat
# Language: en-US
# NeedsCompilation: yes
# Packaged: 2019-01-13 12:08:17 UTC; jeroen
# Author: Jeroen Ooms [aut, cre] (<https://orcid.org/0000-0002-4035-0289>)
# Maintainer: Jeroen Ooms <jeroen@berkeley.edu>
# Repository: CRAN
# Date/Publication: 2019-01-13 12:50:03 UTC
