{% set version = '1.4.7' %}

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

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

source:
  url:
    - {{ cran_mirror }}/src/contrib/httr_{{ version }}.tar.gz
    - {{ cran_mirror }}/src/contrib/Archive/httr/httr_{{ version }}.tar.gz
  sha256: 1555e6c2fb67bd38ff11b479f74aa287b2d93f4add487aec53b836ff07de3a3a

build:
  merge_build_host: True  # [win]
  # If this is a new build for the same version, increment the build number.
  number: 0
  # no skip
  noarch: generic

  # This is required to make R link correctly on Linux.
  rpaths:
    - lib/R/lib/
    - lib/

# Suggests: covr, httpuv, jpeg, knitr, png, readr, rmarkdown, testthat (>= 0.8.0), xml2
requirements:
  build:
    - {{ posix }}zip               # [win]

  host:
    - r-base
    - r-r6
    - r-curl >=5.0.2
    - r-jsonlite
    - r-mime
    - r-openssl >=0.8

  run:
    - r-base
    - r-r6
    - r-curl >=5.0.2
    - r-jsonlite
    - r-mime
    - r-openssl >=0.8

test:
  commands:
    # You can put additional test commands to be run here.
    - $R -e "library('httr')"           # [not win]
    - "\"%R%\" -e \"library('httr')\""  # [win]

  # You can also put a file called run_test.py, run_test.sh, or run_test.bat
  # in the recipe that will be run at test time.

  # requires:
    # Put any additional test requirements here.

about:
  home: https://httr.r-lib.org/, https://github.com/r-lib/httr
  license: MIT
  summary: Useful tools for working with HTTP organised by HTTP verbs (GET(), POST(), etc). Configuration
    functions make it easy to control additional request components (authenticate(),
    add_headers() and so on).
  license_family: MIT
  license_file:
    - '{{ environ["PREFIX"] }}/lib/R/share/licenses/MIT'
    - LICENSE

extra:
  recipe-maintainers:
    - johanneskoester
    - bgruening
    - mingwandroid

# The original CRAN metadata for this package was:

# Package: httr
# Title: Tools for Working with URLs and HTTP
# Version: 1.4.7
# Authors@R: c( person("Hadley", "Wickham", , "hadley@posit.co", role = c("aut", "cre")), person("Posit, PBC", role = c("cph", "fnd")) )
# Description: Useful tools for working with HTTP organised by HTTP verbs (GET(), POST(), etc). Configuration functions make it easy to control additional request components (authenticate(), add_headers() and so on).
# License: MIT + file LICENSE
# URL: https://httr.r-lib.org/, https://github.com/r-lib/httr
# BugReports: https://github.com/r-lib/httr/issues
# Depends: R (>= 3.5)
# Imports: curl (>= 5.0.2), jsonlite, mime, openssl (>= 0.8), R6
# Suggests: covr, httpuv, jpeg, knitr, png, readr, rmarkdown, testthat (>= 0.8.0), xml2
# VignetteBuilder: knitr
# Config/Needs/website: tidyverse/tidytemplate
# Encoding: UTF-8
# RoxygenNote: 7.2.3
# NeedsCompilation: no
# Packaged: 2023-08-15 02:56:56 UTC; hadleywickham
# Author: Hadley Wickham [aut, cre], Posit, PBC [cph, fnd]
# Maintainer: Hadley Wickham <hadley@posit.co>
# Repository: CRAN
# Date/Publication: 2023-08-15 09:00:02 UTC

# See
# https://docs.conda.io/projects/conda-build for
# more information about meta.yaml
