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

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

source:
  fn: hms_{{ version }}.tar.gz
  url:
    - {{ cran_mirror }}/src/contrib/hms_{{ version }}.tar.gz
    - {{ cran_mirror }}/src/contrib/Archive/hms/hms_{{ version }}.tar.gz
  sha256: a57820b3e3221e973cba9500b4ad7953730110ee398693d150af833f26d5d0bc

build:
  merge_build_host: True  # [win]
  number: 0
  skip: true  # [win32]
  rpaths:
    - lib/R/lib/
    - lib/

requirements:
  build:
    - {{posix}}zip               # [win]
  host:
    - r-base
    - r-pkgconfig
    - r-rlang
  run:
    - r-base
    - r-pkgconfig
    - r-rlang

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

about:
  home: https://github.com/tidyverse/hms
  license: GPL-3
  summary: Implements an S3 class for storing and formatting time-of-day values, based on the
    'difftime' class.
  license_family: GPL3
  license_file: '{{ environ["PREFIX"] }}/lib/R/share/licenses/GPL-3'  # [unix]
  license_file: '{{ environ["PREFIX"] }}\R\share\licenses\GPL-3'  # [win]

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