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

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

source:
  url:
    - {{ cran_mirror }}/src/contrib/DBI_{{ version }}.tar.gz
    - {{ cran_mirror }}/src/contrib/Archive/DBI/DBI_{{ version }}.tar.gz
  sha256: 38bb33753da5bddb78893a5228a5d269dae3bf16f21dc5d9853ac9c24d31428d

build:
  merge_build_host: true  # [win]
  number: 2
  noarch: generic
  rpaths:
    - lib/R/lib/
    - lib/

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

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

about:
  home: http://r-dbi.github.io/DBI
  license: LGPL-2.1-or-later
  summary: A database interface definition for communication between R and relational database management systems.  All classes in this package are virtual and need to be extended by the various R/DBMS implementations.
  license_family: LGPL
  license_file:
    - {{ environ["PREFIX"] }}/lib/R/share/licenses/LGPL-2.1

extra:
  recipe-maintainers:
    - conda-forge/r
