{% set version = '1.2.0' %}

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

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

source:
  url:
    - {{ cran_mirror }}/src/contrib/prettyunits_{{ version }}.tar.gz
    - {{ cran_mirror }}/src/contrib/Archive/prettyunits/prettyunits_{{ version }}.tar.gz
  sha256: f059f27e2a5c82e351fe05b87ad712f7afc273c651450453f59d99af5deeacea

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: codetools, covr, testthat
requirements:
  build:
    - {{ posix }}zip               # [win]

  host:
    - r-base

  run:
    - r-base

test:
  commands:
    # You can put additional test commands to be run here.
    - $R -e "library('prettyunits')"           # [not win]
    - "\"%R%\" -e \"library('prettyunits')\""  # [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://github.com/r-lib/prettyunits
  license: MIT
  summary: 'Pretty, human readable formatting of quantities. Time intervals: ''1337000'' -> ''15d
    11h 23m 20s''. Vague time intervals: ''2674000'' -> ''about a month ago''. Bytes:
    ''1337'' -> ''1.34 kB''. Rounding: ''99'' with 3 significant digits -> ''99.0''
    p-values: ''0.00001'' -> ''<0.0001''. Colors: ''#FF0000'' -> ''red''. Quantities:
    ''1239437'' -> ''1.24 M''.'
  license_family: MIT
  license_file:
    - '{{ environ["PREFIX"] }}/lib/R/share/licenses/MIT'
    - LICENSE

extra:
  recipe-maintainers:
    - mingwandroid

# The original CRAN metadata for this package was:

# Package: prettyunits
# Title: Pretty, Human Readable Formatting of Quantities
# Version: 1.2.0
# Authors@R: c( person("Gabor", "Csardi", email="csardi.gabor@gmail.com", role=c("aut", "cre")), person("Bill", "Denney", email="wdenney@humanpredictions.com", role=c("ctb"), comment=c(ORCID="0000-0002-5759-428X")), person("Christophe", "Regouby", email="christophe.regouby@free.fr", role=c("ctb")) )
# Description: Pretty, human readable formatting of quantities. Time intervals: '1337000' -> '15d 11h 23m 20s'. Vague time intervals: '2674000' -> 'about a month ago'. Bytes: '1337' -> '1.34 kB'. Rounding: '99' with 3 significant digits -> '99.0' p-values: '0.00001' -> '<0.0001'. Colors: '#FF0000' -> 'red'. Quantities: '1239437' -> '1.24 M'.
# License: MIT + file LICENSE
# URL: https://github.com/r-lib/prettyunits
# BugReports: https://github.com/r-lib/prettyunits/issues
# Depends: R(>= 2.10)
# Suggests: codetools, covr, testthat
# RoxygenNote: 7.2.3
# Encoding: UTF-8
# NeedsCompilation: no
# Packaged: 2023-09-24 10:53:19 UTC; gaborcsardi
# Author: Gabor Csardi [aut, cre], Bill Denney [ctb] (<https://orcid.org/0000-0002-5759-428X>), Christophe Regouby [ctb]
# Maintainer: Gabor Csardi <csardi.gabor@gmail.com>
# Repository: CRAN
# Date/Publication: 2023-09-24 21:10:02 UTC

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