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

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

source:
  fn: pool_{{ version }}.tar.gz
  url:
    - {{ cran_mirror }}/src/contrib/pool_{{ version }}.tar.gz
    - {{ cran_mirror }}/src/contrib/Archive/pool/pool_{{ version }}.tar.gz
  sha256: 1cc0c5ad43ae35ea0078fd06473de01bfb538c71d5092ebea00f65eab9f313a9

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-dbi
    - r-r6
    - r-dbplyr
    - r-dplyr
    - r-later
  run:
    - r-base
    - r-dbi
    - r-r6
    - r-dbplyr
    - r-dplyr
    - r-later

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

about:
  home: https://github.com/rstudio/pool
  license: GPL-3
  summary: Enables the creation of object pools, which make it less computationally expensive
    to fetch a new object. Currently the only supported pooled objects are 'DBI' connections.
  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
    - dbast
    - halldc
