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

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

source:
  url:
    - {{ cran_mirror }}/src/contrib/zip_{{ version }}.tar.gz
    - {{ cran_mirror }}/src/contrib/Archive/zip/zip_{{ version }}.tar.gz
  sha256: ab5dd0c63bd30b478d0f878735e7baf36e2e76e4d12d2b4b8eddd03b665502b0

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

requirements:
  build:
    - {{ compiler('c') }}              # [not win]
    - {{ compiler('m2w64_c') }}        # [win]
    - {{posix}}filesystem        # [win]
    - {{posix}}make
    - {{posix}}sed               # [win]
    - {{posix}}coreutils         # [win]
    - {{posix}}zip               # [win]
  host:
    - r-base
  run:
    - r-base
    - {{native}}gcc-libs         # [win]

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

about:
  home: https://github.com/r-lib/zip#readme
  license: CC0
  summary: Cross-Platform 'zip' Compression Library. A replacement for the 'zip' function, that
    does not require any additional external tools on any platform.
  license_family: CC

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

# Package: zip
# Title: Cross-Platform 'zip' Compression
# Version: 2.0.3
# Author: Gabor Csardi, Kuba Podgorski, Rich Geldreich
# Maintainer: Gabor Csardi <csardi.gabor@gmail.com>
# Description: Cross-Platform 'zip' Compression Library. A replacement for the 'zip' function, that does not require any additional external tools on any platform.
# License: CC0
# LazyData: true
# URL: https://github.com/r-lib/zip#readme
# BugReports: https://github.com/r-lib/zip/issues
# RoxygenNote: 6.1.1
# Suggests: covr, processx, R6, testthat, withr
# Encoding: UTF-8
# NeedsCompilation: yes
# Packaged: 2019-07-03 10:27:59 UTC; gaborcsardi
# Repository: CRAN
# Date/Publication: 2019-07-03 10:50:40 UTC
