{% set version = '1.2.2' %}

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

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

source:
  url:
    - {{ cran_mirror }}/src/contrib/progress_{{ version }}.tar.gz
    - {{ cran_mirror }}/src/contrib/Archive/progress/progress_{{ version }}.tar.gz
  sha256: b4a4d8ed55db99394b036a29a0fb20b5dd2a91c211a1d651c52a1023cc58ff35

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

  host:
    - r-base
    - r-r6
    - r-crayon
    - r-hms
    - r-prettyunits

  run:
    - r-base
    - r-r6
    - r-crayon
    - r-hms
    - r-prettyunits

test:
  commands:
    # You can put additional test commands to be run here.
    - $R -e "library('progress')"           # [not win]
    - "\"%R%\" -e \"library('progress')\""  # [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/progress#readme
  license: MIT
  summary: Configurable Progress bars, they may include percentage, elapsed time, and/or the
    estimated completion time. They work in terminals, in 'Emacs' 'ESS', 'RStudio',
    'Windows' 'Rgui' and the 'macOS' 'R.app'. The package also provides a 'C++' 'API',
    that works with or without 'Rcpp'.
  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: progress
# Title: Terminal Progress Bars
# Version: 1.2.2
# Author: Gabor Csardi [aut, cre], Rich FitzJohn [aut]
# Maintainer: Gabor Csardi <csardi.gabor@gmail.com>
# Description: Configurable Progress bars, they may include percentage, elapsed time, and/or the estimated completion time. They work in terminals, in 'Emacs' 'ESS', 'RStudio', 'Windows' 'Rgui' and the 'macOS' 'R.app'. The package also provides a 'C++' 'API', that works with or without 'Rcpp'.
# License: MIT + file LICENSE
# LazyData: true
# URL: https://github.com/r-lib/progress#readme
# BugReports: https://github.com/r-lib/progress/issues
# Imports: hms, prettyunits, R6, crayon
# Suggests: Rcpp, testthat, withr
# RoxygenNote: 6.1.0
# Encoding: UTF-8
# NeedsCompilation: no
# Packaged: 2019-05-15 20:28:47 UTC; gaborcsardi
# Repository: CRAN
# Date/Publication: 2019-05-16 21:30:03 UTC

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