{% set version = '0.7.0' %}

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

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

source:
  url:
    - {{ cran_mirror }}/src/contrib/clock_{{ version }}.tar.gz
    - {{ cran_mirror }}/src/contrib/Archive/clock/clock_{{ version }}.tar.gz
  sha256: 54e57a3b3f8c308d67536e2a75d48f3493cf7fe821bfa4da9159b4fb2ceca874

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, knitr, magrittr, pillar, rmarkdown, slider (>= 0.3.0), testthat (>= 3.0.0), withr
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-cli >=3.6.1
    - r-cpp11 >=0.4.3
    - r-lifecycle >=1.0.3
    - r-rlang >=1.1.0
    - r-tzdb >=0.4.0
    - r-vctrs >=0.6.1

  run:
    - r-base
    - {{native}}gcc-libs         # [win]
    - r-cli >=3.6.1
    - r-cpp11 >=0.4.3
    - r-lifecycle >=1.0.3
    - r-rlang >=1.1.0
    - r-tzdb >=0.4.0
    - r-vctrs >=0.6.1

test:
  commands:
    # You can put additional test commands to be run here.
    - $R -e "library('clock')"           # [not win]
    - "\"%R%\" -e \"library('clock')\""  # [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://clock.r-lib.org, https://github.com/r-lib/clock
  license: MIT
  summary: 'Provides a comprehensive library for date-time manipulations using a new family of
    orthogonal date-time classes (durations, time points, zoned-times, and calendars)
    that partition responsibilities so that the complexities of time zones are only
    considered when they are really needed. Capabilities include: date-time parsing,
    formatting, arithmetic, extraction and updating of components, and rounding.'
  license_family: MIT
  license_file:
    - '{{ environ["PREFIX"] }}/lib/R/share/licenses/MIT'
    - LICENSE

# The original CRAN metadata for this package was:

# Package: clock
# Title: Date-Time Types and Tools
# Version: 0.7.0
# Authors@R: c( person("Davis", "Vaughan", , "davis@posit.co", role = c("aut", "cre")), person("Posit Software, PBC", role = c("cph", "fnd")) )
# Description: Provides a comprehensive library for date-time manipulations using a new family of orthogonal date-time classes (durations, time points, zoned-times, and calendars) that partition responsibilities so that the complexities of time zones are only considered when they are really needed. Capabilities include: date-time parsing, formatting, arithmetic, extraction and updating of components, and rounding.
# License: MIT + file LICENSE
# URL: https://clock.r-lib.org, https://github.com/r-lib/clock
# BugReports: https://github.com/r-lib/clock/issues
# Depends: R (>= 3.5.0)
# Imports: cli (>= 3.6.1), lifecycle (>= 1.0.3), rlang (>= 1.1.0), tzdb (>= 0.4.0), vctrs (>= 0.6.1)
# Suggests: covr, knitr, magrittr, pillar, rmarkdown, slider (>= 0.3.0), testthat (>= 3.0.0), withr
# LinkingTo: cpp11 (>= 0.4.3), tzdb (>= 0.4.0)
# VignetteBuilder: knitr
# Config/Needs/website: lubridate, tidyverse/tidytemplate
# Config/testthat/edition: 3
# Encoding: UTF-8
# LazyData: true
# RoxygenNote: 7.2.3
# NeedsCompilation: yes
# Packaged: 2023-05-15 17:58:13 UTC; davis
# Author: Davis Vaughan [aut, cre], Posit Software, PBC [cph, fnd]
# Maintainer: Davis Vaughan <davis@posit.co>
# Repository: CRAN
# Date/Publication: 2023-05-15 19:10:05 UTC

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