{% set version = "1.1.12" %}
{% set posix = 'm2-' if win else '' %}

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

source:
  url:
    - {{ cran_mirror }}/src/contrib/archive_{{ version }}.tar.gz
    - {{ cran_mirror }}/src/contrib/Archive/archive/archive_{{ version }}.tar.gz
  sha256: 70bb2e5a87867a02b261f0022a008d3f884813ed08a251dfa208eca301ddd138

build:
  skip: true  # [not linux]
  number: 1
  rpaths:
    - lib/R/lib/
    - lib/

requirements:
  build:
    - {{ compiler('c') }}              # [not win]
    - {{ stdlib("c") }}                # [not win]
    - {{ compiler('m2w64_c') }}        # [win]
    - {{ stdlib("c") }}                # [win]
    - {{ compiler('cxx') }}            # [not win]
    - {{ compiler('m2w64_cxx') }}      # [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]
    - cross-r-base {{ r_base }}    # [build_platform != target_platform]
  host:
    - r-base
    - r-cli
    - r-glue
    - r-rlang
    - r-tibble
    - libarchive
  run:
    - r-base
    - r-cli
    - r-glue
    - r-rlang
    - r-tibble
    - libarchive

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

about:
  home: https://archive.r-lib.org/, https://github.com/r-lib/archive
  license: MIT
  summary: Bindings to 'libarchive' <http://www.libarchive.org> the Multi-format archive and compression library. Offers R connections and direct extraction for many archive formats including 'tar', 'ZIP', '7-zip', 'RAR', 'CAB' and compression formats including 'gzip', 'bzip2', 'compress', 'lzma' and 'xz'.
  license_family: MIT
  license_file:
    - '{{ environ["PREFIX"] }}/lib/R/share/licenses/MIT'
    - LICENSE

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

# Package: archive
# Title: Multi-Format Archive and Compression Support
# Version: 1.1.5
# Authors@R: c( person("Jim", "Hester", role = "aut", comment = c(ORCID = "0000-0002-2739-7082")), person("Gabor", "Csardi", , "csardi.gabor@gmail.com", role = c("aut", "cre")), person("Ondrej", "Holy", role = "cph", comment = "archive_write_add_filter implementation"), person("RStudio", role = c("cph", "fnd")) )
# Description: Bindings to 'libarchive' <http://www.libarchive.org> the Multi-format archive and compression library. Offers R connections and direct extraction for many archive formats including 'tar', 'ZIP', '7-zip', 'RAR', 'CAB' and compression formats including 'gzip', 'bzip2', 'compress', 'lzma' and 'xz'.
# License: MIT + file LICENSE
# URL: https://archive.r-lib.org/, https://github.com/r-lib/archive
# BugReports: https://github.com/r-lib/archive/issues
# Depends: R (>= 3.1.0)
# Imports: cli, glue, rlang, tibble
# Suggests: covr, testthat
# LinkingTo: cli, cpp11
# ByteCompile: true
# Encoding: UTF-8
# RoxygenNote: 7.1.2
# SystemRequirements: C++11, libarchive: libarchive-dev (deb), libarchive-devel (rpm), libarchive (homebrew), libarchive_dev (csw)
# Biarch: true
# NeedsCompilation: yes
# Packaged: 2022-05-06 12:21:42 UTC; gaborcsardi
# Author: Jim Hester [aut] (<https://orcid.org/0000-0002-2739-7082>), Gabor Csardi [aut, cre], Ondrej Holy [cph] (archive_write_add_filter implementation), RStudio [cph, fnd]
# Maintainer: Gabor Csardi <csardi.gabor@gmail.com>
# Repository: CRAN
# Date/Publication: 2022-05-06 12:40:02 UTC
