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

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

source:
  url:
    - {{ cran_mirror }}/src/contrib/git2r_{{ version }}.tar.gz
    - {{ cran_mirror }}/src/contrib/Archive/git2r/git2r_{{ version }}.tar.gz
  sha256: aae9c515af649ec651c012f903c732853ee52fba39510dedfedeaa841a5fcc8a

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

requirements:
  build:
    - {{ compiler('c') }}        # [not win]
    - {{native}}toolchain        # [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
    - libssh2
    - openssl
    - zlib
  run:
    - r-base
    - {{native}}gcc-libs         # [win]
    - libssh2
    - openssl
    - zlib

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

about:
  home: https://github.com/ropensci/git2r
  license: GPL-2
  summary: Interface to the 'libgit2' library, which is a pure C implementation of the 'Git'
    core methods. Provides access to 'Git' repositories to extract data and running
    some basic 'Git' commands.
  license_family: GPL2
  license_file: '{{ environ["PREFIX"] }}/lib/R/share/licenses/GPL-2'

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

# Package: git2r
# Title: Provides Access to Git Repositories
# Description: Interface to the 'libgit2' library, which is a pure C implementation of the 'Git' core methods. Provides access to 'Git' repositories to extract data and running some basic 'Git' commands.
# Version: 0.25.1
# License: GPL-2
# Copyright: See COPYRIGHTS file.
# URL: https://github.com/ropensci/git2r
# BugReports: https://github.com/ropensci/git2r/issues
# Maintainer: Stefan Widgren <stefan.widgren@gmail.com>
# Author: See AUTHORS file.
# Imports: graphics, utils
# Depends: R (>= 3.1)
# Suggests: getPass
# Type: Package
# LazyData: true
# Biarch: true
# NeedsCompilation: yes
# SystemRequirements: By default, git2r uses a system installation of the libgit2 headers and library. However, if a system installation is not available, builds and uses a bundled version of the libgit2 source. zlib headers and library. OpenSSL headers and library (non-macOS). LibSSH2 (optional on non-Windows) to enable the SSH transport.
# Collate: 'blame.R' 'blob.R' 'branch.R' 'bundle_r_package.R' 'checkout.R' 'commit.R' 'config.R' 'contributions.R' 'credential.R' 'diff.R' 'fetch.R' 'git2r.R' 'index.R' 'libgit2.R' 'merge.R' 'note.R' 'odb.R' 'plot.R' 'pull.R' 'punch_card.R' 'push.R' 'reference.R' 'reflog.R' 'refspec.R' 'remote.R' 'repository.R' 'reset.R' 'revparse.R' 'sha.R' 'signature.R' 'stash.R' 'status.R' 'tag.R' 'time.R' 'tree.R' 'when.R'
# Encoding: UTF-8
# RoxygenNote: 6.1.1
# Packaged: 2019-03-17 12:58:16 UTC; stefan
# Repository: CRAN
# Date/Publication: 2019-03-17 19:00:08 UTC
