{% set version = "2.7.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: 9133da0ece4252f84573835461c1ab3882bee116b097f343e0228a7faef8b9b1

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

requirements:
  build:
    - {{ compiler('c') }}              # [not win]
    - {{ compiler('m2w64_c') }}        # [win]
    - {{ compiler('cxx') }}            # [not win]
    - {{ compiler('m2w64_cxx') }}      # [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-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
  license_file: LICENSE

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

# Package: Rlabkey
# Version: 2.3.2
# Date: 2019-09-12
# 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: 2019-09-16 21:43:01 UTC; Cory
# Repository: CRAN
# Date/Publication: 2019-09-17 14:20:03 UTC
