{% set version = '2.0.1' %}

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

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

source:
  fn: remotes_{{ version }}.tar.gz
  url:
    - {{ cran_mirror }}/src/contrib/remotes_{{ version }}.tar.gz
    - {{ cran_mirror }}/src/contrib/Archive/remotes/remotes_{{ version }}.tar.gz
  sha256: 5ac3aac03706fbff0d43459c3d83d76f757b4804ba298824715e22b323a37ff6

build:
  merge_build_host: True  # [win]
  number: 0

  rpaths:
    - lib/R/lib/
    - lib/

requirements:
  build:
    - {{posix}}zip               # [win]

  host:
    - r-base

  run:
    - r-base

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

about:
  home: https://github.com/r-lib/remotes#readme
  license: GPL (>= 2)
  summary: Download and install R packages stored in 'GitHub', 'BitBucket', or plain 'subversion'
    or 'git' repositories. This package is a lightweight replacement of the 'install_*'
    functions in 'devtools'. Indeed most of the code was copied over from 'devtools'.
  license_family: GPL3
  license_file: '{{ environ["PREFIX"] }}/lib/R/share/licenses/GPL-3'  # [unix]
  license_file: '{{ environ["PREFIX"] }}\R\share\licenses\GPL-3'  # [win]

extra:
  recipe-maintainers:
    - johanneskoester
    - bgruening
    - daler
    - jdblischak
    - cbrueffer
    - dbast
