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

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

source:
  url:
    - {{ cran_mirror }}/src/contrib/usethis_{{ version }}.tar.gz
    - {{ cran_mirror }}/src/contrib/Archive/usethis/usethis_{{ version }}.tar.gz
  sha256: 96f33cc00e9126e5cd891b6052cbb7e23df64f4f32df79777fe9773dfa644dbd

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

requirements:
  build:
    - {{posix}}zip               # [win]
  host:
    - r-base
    - r-clipr >=0.3.0
    - r-clisymbols
    - r-crayon
    - r-curl >=2.7
    - r-desc
    - r-fs >=1.2.0
    - r-gh
    - r-git2r >=0.23
    - r-glue
    - r-rlang
    - r-rprojroot >=1.2
    - r-rstudioapi
    - r-whisker
  run:
    - r-base
    - r-clipr >=0.3.0
    - r-clisymbols
    - r-crayon
    - r-curl >=2.7
    - r-desc
    - r-fs >=1.2.0
    - r-gh
    - r-git2r >=0.23
    - r-glue
    - r-rlang
    - r-rprojroot >=1.2
    - r-rstudioapi
    - r-whisker

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

about:
  home: https://github.com/r-lib/usethis
  license: GPL-3
  summary: Automate package and project setup tasks that are otherwise performed manually. This
    includes setting up unit testing, test  coverage, continuous integration, Git, 'GitHub',
    licenses, 'Rcpp', 'RStudio'  projects, and more.
  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
