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

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

source:
  url:
    - {{ cran_mirror }}/src/contrib/RODBC_{{ version }}.tar.gz
    - {{ cran_mirror }}/src/contrib/Archive/RODBC/RODBC_{{ version }}.tar.gz
  sha256: 223d4b83dd44349a3bcfa7ade4401ce9f0d6e83b4933c68df8949e39f3d79639

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

requirements:
  build:
    - {{ compiler('c') }}              # [not win]
    - {{ compiler('m2w64_c') }}        # [win]
    - {{posix}}filesystem        # [win]
    - {{posix}}sed               # [win]
    - {{posix}}grep              # [win]
    - {{posix}}autoconf
    - {{posix}}automake          # [not win]
    - {{posix}}automake-wrapper  # [win]
    - {{posix}}pkg-config
    - {{posix}}make
    - {{posix}}coreutils         # [win]
    - {{posix}}zip               # [win]
  host:
    - r-base
    - unixodbc                   # [unix]
  run:
    - r-base
    - {{native}}gcc-libs         # [win]
    - unixodbc                   # [unix]

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

about:
  home: https://CRAN.R-project.org/package=RODBC
  license: GPL-2 | GPL-3
  summary: An ODBC database interface.
  license_family: GPL3
  license_file:
    - '{{ environ["PREFIX"] }}/lib/R/share/licenses/GPL-2'
    - '{{ environ["PREFIX"] }}/lib/R/share/licenses/GPL-3'

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

# Package: RODBC
# Version: 1.3-16
# Revision: $Rev: 3500 $
# Date: 2019-09-02
# Authors@R: c(person("Brian", "Ripley", role = c("aut", "cre"), email = "ripley@stats.ox.ac.uk"), person("Michael", "Lapsley", role = "aut", comment = "1999 to Oct 2002"))
# Title: ODBC Database Access
# Description: An ODBC database interface.
# SystemRequirements: An ODBC3 driver manager and drivers.
# Depends: R (>= 3.0.0)
# Imports: stats
# LazyLoad: yes
# Biarch: yes
# License: GPL-2 | GPL-3
# NeedsCompilation: yes
# Packaged: 2019-09-02 20:23:54 UTC; ripley
# Author: Brian Ripley [aut, cre], Michael Lapsley [aut] (1999 to Oct 2002)
# Maintainer: Brian Ripley <ripley@stats.ox.ac.uk>
# Repository: CRAN
# Date/Publication: 2019-09-03 05:28:45 UTC
