{% set version = '3.0-1' %}

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

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

source:
  fn: memuse_{{ version }}.tar.gz
  url:
    - https://cran.r-project.org/src/contrib/memuse_{{ version }}.tar.gz
    - https://cran.r-project.org/src/contrib/Archive/memuse/memuse_{{ version }}.tar.gz
  sha256: 8587584830b792ae70525d4ffbc661ff232d9ced3170b79663694a9d80e0b2bb

build:
  merge_build_host: True  # [win]
  number: 2
  skip: true  # [win32]

  rpaths:
    - lib/R/lib/
    - lib/
requirements:
  build:
    - posix                # [win]
    - {{ compiler('c') }}        # [unix]
    - {{ compiler('m2w64_c') }}  # [win]
  host:
    - r-base

  run:
    - r-base

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

about:
  home: https://github.com/shinra-dev/memuse
  license: BSD 2-clause
  summary: How much ram do you need to store a 100,000 by 100,000 matrix? How much ram is your
    current R session using? How much ram do you even have? Learn the scintillating
    answer to these and many more such questions with the 'memuse' package.
  license_family: BSD

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