{% set version = "0.8.2" %}

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

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

source:
  fn: sparklyr_{{ version }}.tar.gz
  url:
    - https://cran.r-project.org/src/contrib/sparklyr_{{ version }}.tar.gz
    - https://cran.r-project.org/src/contrib/Archive/sparklyr/sparklyr_{{ version }}.tar.gz
  sha256: b73a459011144233d2dddfbbbe0f941407a91ba2c46a1cfcf39c5f921bb9f37a

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

requirements:
  build:
    - r-base
    - r-dbi >=0.6_1
    - r-assertthat
    - r-base64enc
    - r-broom
    - r-config >=0.2
    - r-dbplyr >=1.1.0
    - r-digest
    - r-dplyr >=0.7.2
    - r-httr >=1.2.1
    - r-jsonlite >=1.4
    - r-lazyeval >=0.2.0
    - r-openssl >=0.8
    - r-rappdirs
    - r-readr >=1.1.0
    - r-rlang >=0.1.4
    - r-rprojroot
    - r-rstudioapi
    - r-shiny >=1.0.1
    - r-withr
    - r-xml2

  run:
    - r-base
    - r-dbi >=0.6_1
    - r-assertthat
    - r-base64enc
    - r-broom
    - r-config >=0.2
    - r-dbplyr >=1.1.0
    - r-digest
    - r-dplyr >=0.7.2
    - r-httr >=1.2.1
    - r-jsonlite >=1.4
    - r-lazyeval >=0.2.0
    - r-openssl >=0.8
    - r-rappdirs
    - r-readr >=1.1.0
    - r-rlang >=0.1.4
    - r-rprojroot
    - r-rstudioapi
    - r-shiny >=1.0.1
    - r-withr
    - r-xml2

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

about:
  home: http://spark.rstudio.com
  license: Apache 2.0
  summary: |
    R interface to Apache Spark, a fast and general engine for big data processing.
    This package supports connecting to local and remote
    Apache Spark clusters, provides a 'dplyr' compatible back-end, and provides an interface
    to Spark's built-in machine learning algorithms.
  license_family: APACHE

extra:
  recipe-maintainers:
    - johanneskoester
    - bgruening
