{% set version = '0.4.0' %}

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

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

source:
  url:
    - {{ cran_mirror }}/src/contrib/tzdb_{{ version }}.tar.gz
    - {{ cran_mirror }}/src/contrib/Archive/tzdb/tzdb_{{ version }}.tar.gz
  sha256: 4253c66041bdddfd463c98183bf0052fbcacdb7c5cff9eadbb858b3dcf9d3a23

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

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

# Suggests: covr, testthat (>= 3.0.0)
requirements:
  build:
    - {{ compiler('c') }}              # [not win]
    - {{ compiler('m2w64_c') }}        # [win]
    - {{ compiler('cxx') }}            # [not win]
    - {{ compiler('m2w64_cxx') }}      # [win]
    - {{ posix }}filesystem        # [win]
    - {{ posix }}make
    - {{ posix }}sed               # [win]
    - {{ posix }}coreutils         # [win]
    - {{ posix }}zip               # [win]

  host:
    - r-base
    - r-cpp11 >=0.4.2

  run:
    - r-base
    - {{native}}gcc-libs         # [win]
    - r-cpp11 >=0.4.2

test:
  commands:
    # You can put additional test commands to be run here.
    - $R -e "library('tzdb')"           # [not win]
    - "\"%R%\" -e \"library('tzdb')\""  # [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://tzdb.r-lib.org, https://github.com/r-lib/tzdb
  license: MIT
  summary: Provides an up-to-date copy of the Internet Assigned Numbers Authority (IANA) Time
    Zone Database. It is updated periodically to reflect changes made by political bodies
    to time zone boundaries, UTC offsets, and daylight saving time rules. Additionally,
    this package provides a C++ interface for working with the 'date' library. 'date'
    provides comprehensive support for working with dates and date-times, which this
    package exposes to make it easier for other R packages to utilize. Headers are provided
    for calendar specific calculations, along with a limited interface for time zone
    manipulations.
  license_family: MIT
  license_file:
    - '{{ environ["PREFIX"] }}/lib/R/share/licenses/MIT'
    - LICENSE

# The original CRAN metadata for this package was:

# Package: tzdb
# Title: Time Zone Database Information
# Version: 0.4.0
# Authors@R: c( person("Davis", "Vaughan", , "davis@posit.co", role = c("aut", "cre")), person("Howard", "Hinnant", role = "cph", comment = "Author of the included date library"), person("Posit Software, PBC", role = c("cph", "fnd")) )
# Description: Provides an up-to-date copy of the Internet Assigned Numbers Authority (IANA) Time Zone Database. It is updated periodically to reflect changes made by political bodies to time zone boundaries, UTC offsets, and daylight saving time rules. Additionally, this package provides a C++ interface for working with the 'date' library. 'date' provides comprehensive support for working with dates and date-times, which this package exposes to make it easier for other R packages to utilize. Headers are provided for calendar specific calculations, along with a limited interface for time zone manipulations.
# License: MIT + file LICENSE
# URL: https://tzdb.r-lib.org, https://github.com/r-lib/tzdb
# BugReports: https://github.com/r-lib/tzdb/issues
# Depends: R (>= 3.5.0)
# Suggests: covr, testthat (>= 3.0.0)
# LinkingTo: cpp11 (>= 0.4.2)
# Biarch: yes
# Config/Needs/website: tidyverse/tidytemplate
# Config/testthat/edition: 3
# Encoding: UTF-8
# RoxygenNote: 7.2.3
# NeedsCompilation: yes
# Packaged: 2023-05-12 12:40:06 UTC; davis
# Author: Davis Vaughan [aut, cre], Howard Hinnant [cph] (Author of the included date library), Posit Software, PBC [cph, fnd]
# Maintainer: Davis Vaughan <davis@posit.co>
# Repository: CRAN
# Date/Publication: 2023-05-12 23:00:02 UTC

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