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

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

source:
  url:
    - {{ cran_mirror }}/src/contrib/gert_{{ version }}.tar.gz
    - {{ cran_mirror }}/src/contrib/Archive/gert/gert_{{ version }}.tar.gz
  sha256: 77d256f71af01bec65831cf05b848bf44fa9952e70eea855d7594dc11a935d31

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 }}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:
    - r-base
    - r-askpass
    - r-credentials >=1.0
    - r-openssl >=1.4.1
    - libgit2
  run:
    - r-base
    - {{ native }}gcc-libs         # [win]
    - r-askpass
    - r-credentials >=1.0
    - r-openssl >=1.4.1
    - libgit2

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

about:
  home: https://jeroen.cran.dev/gert (website), httsp://github.com/r-lib/gert (devel), https://libgit2.org
    (upstream)
  license: MIT
  summary: Simple git client based on 'libgit2' with user-friendly authentication and support
    for both SSH and HTTPS remotes on all platforms. User credentials are shared with
    command line 'git' through the git-credential store and ssh keys stored on disk
    or ssh-agent. On Linux, a somewhat recent  version of 'libgit2' is required.
  license_family: MIT
  license_file:
    - '{{ environ["PREFIX"] }}/lib/R/share/licenses/MIT'
    - LICENSE

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

# Package: gert
# Type: Package
# Title: Simple Git Client for R
# Version: 0.3
# Author: Jeroen Ooms
# Maintainer: Jeroen Ooms <jeroen@berkeley.edu>
# Description: Simple git client based on 'libgit2' with user-friendly authentication and support for both SSH and HTTPS remotes on all platforms. User credentials are shared with command line 'git' through the git-credential store and ssh keys stored on disk or ssh-agent. On Linux, a somewhat recent  version of 'libgit2' is required.
# License: MIT + file LICENSE
# SystemRequirements: libgit2 (>= 0.26): libgit2-devel (rpm) or libgit2-dev (deb)
# URL: https://jeroen.cran.dev/gert (website), httsp://github.com/r-lib/gert (devel), https://libgit2.org (upstream)
# BugReports: http://github.com/r-lib/gert/issues
# Encoding: UTF-8
# RoxygenNote: 6.1.1
# Imports: openssl (>= 1.4.1), credentials (>= 1.0), askpass
# Suggests: testthat
# NeedsCompilation: yes
# Packaged: 2019-10-29 11:54:36 UTC; jeroen
# Repository: CRAN
# Date/Publication: 2019-10-29 13:00:02 UTC
