{% set version = '1.0.2' %}

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

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

source:
  fn: prettyunits_{{ version }}.tar.gz
  url:
    - https://cran.r-project.org/src/contrib/prettyunits_{{ version }}.tar.gz
    - https://cran.r-project.org/src/contrib/Archive/prettyunits/prettyunits_{{ version }}.tar.gz
  sha256: 35a4980586c20650538ae1e4fed4d80fdde3f212b98546fc3c7d9469a1207f5c

build:
  number: 0
  skip: true  # [win32]

  rpaths:
    - lib/R/lib/
    - lib/

requirements:
  build:
    - r-base
    - r-assertthat
    - r-magrittr

  run:
    - r-base
    - r-assertthat
    - r-magrittr

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

about:
  home: https://github.com/gaborcsardi/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.'

  license_family: MIT

extra:
  recipe-maintainers:
    - johanneskoester
    - bgruening
    - daler
