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

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

source:
  url:
    - {{ cran_mirror }}/src/contrib/Rlabkey_{{ version }}.tar.gz
    - {{ cran_mirror }}/src/contrib/Archive/Rlabkey/Rlabkey_{{ version }}.tar.gz
  sha256: 9423c69daffa8262c1800f2e2da58962bc3fe76ea7168565d57833665dba2c59

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

requirements:
  build:
    - {{ compiler('c') }}        # [not win]
    - {{ compiler('cxx') }}      # [not win]
    - {{native}}toolchain        # [win]
    - {{posix}}filesystem        # [win]
    - {{posix}}make
    - {{posix}}sed               # [win]
    - {{posix}}coreutils         # [win]
    - {{posix}}zip               # [win]
  host:
    - r-base
    - r-rcpp >=0.11.0
    - r-httr
    - r-jsonlite
  run:
    - r-base
    - {{native}}gcc-libs         # [win]
    - r-rcpp >=0.11.0
    - r-httr
    - r-jsonlite

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

about:
  home: https://CRAN.R-project.org/package=Rlabkey
  license: Apache License 2.0
  summary: The 'LabKey' client library for R makes it easy for R users to load live data from
    a 'LabKey' Server, <http://www.labkey.com/>, into the R environment for analysis,
    provided users have permissions to read the data. It also enables R users to insert,
    update, and delete records stored on a 'LabKey' Server, provided they have appropriate
    permissions to do so.
  license_family: APACHE

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

# Package: Rlabkey
# Version: 2.2.4
# Date: 2018-11-02
# Title: Data Exchange Between R and 'LabKey' Server
# Author: Peter Hussey
# Maintainer: Cory Nathe <cnathe@labkey.com>
# Description: The 'LabKey' client library for R makes it easy for R users to load live data from a 'LabKey' Server, <http://www.labkey.com/>, into the R environment for analysis, provided users have permissions to read the data. It also enables R users to insert, update, and delete records stored on a 'LabKey' Server, provided they have appropriate permissions to do so.
# License: Apache License 2.0
# Copyright: Copyright (c) 2010-2018 LabKey Corporation
# LazyLoad: true
# Depends: httr, jsonlite
# LinkingTo: Rcpp
# Imports: Rcpp (>= 0.11.0)
# NeedsCompilation: yes
# Packaged: 2018-11-02 18:41:26 UTC; Cory
# Repository: CRAN
# Date/Publication: 2018-11-05 19:20:14 UTC
