{% set version = '0.4-10' %}

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

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

source:
  fn: sqldf_{{ version }}.tar.gz
  url:
    - https://cran.r-project.org/src/contrib/sqldf_{{ version }}.tar.gz
    - https://cran.r-project.org/src/contrib/Archive/sqldf/sqldf_{{ version }}.tar.gz
  sha256: 0786f09cb14174423c2e624be0f844a23ec8dd717403fcf760ebc9375ede1e59

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

requirements:
  build:
    - r-base
    - r-dbi >=0.2_5
    - r-rsqlite >=1.0.0
    - r-chron
    - r-gsubfn >=0.6
    - r-proto

  run:
    - r-base
    - r-dbi >=0.2_5
    - r-rsqlite >=1.0.0
    - r-chron
    - r-gsubfn >=0.6
    - r-proto

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

about:
  home: http://sqldf.googlecode.com
  license: GPL-2
  summary: |
    Description: Manipulate R data frames using SQL.
  license_family: GPL2

extra:
  recipe-maintainers:
    - johanneskoester
    - bgruening
