{% set version = '2.3' %}

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

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

source:
  url:
    - {{ cran_mirror }}/src/contrib/rcdklibs_{{ version }}.tar.gz
    - {{ cran_mirror }}/src/contrib/Archive/rcdklibs/rcdklibs_{{ version }}.tar.gz
  sha256: d733f5ca586ea5fe0a2325d3d281bd5b3ba5b48802b52e7ef837c7c0f4df329a

build:
  merge_build_host: True  # [win]
  # If this is a new build for the same version, increment the build number.
  number: 0
  # no skip
  noarch: generic

  # This is required to make R link correctly on Linux.
  rpaths:
    - lib/R/lib/
    - lib/

requirements:
  build:
    - {{ posix }}zip               # [win]

  host:
    - r-base
    - r-rjava >=0.9_8
    - openjdk  # [linux]

  run:
    - r-base
    - r-rjava >=0.9_8

test:
  requires:
    - openjdk  # [linux]
  commands:
    # You can put additional test commands to be run here.
    - $R -e "library('rcdklibs')"           # [not win]
    - "\"%R%\" -e \"library('rcdklibs')\""  # [win]

  # You can also put a file called run_test.py, run_test.sh, or run_test.bat
  # in the recipe that will be run at test time.

  # requires:
    # Put any additional test requirements here.

about:
  home: https://CRAN.R-project.org/package=rcdklibs
  license: LGPL-3
  summary: An R interface to the Chemistry Development Kit, a Java library for chemoinformatics.
    Given the size of the library itself, this package is not expected to change very
    frequently. To make use of the CDK within R, it is suggested that you use the 'rcdk'
    package. Note that it is possible to directly interact with the CDK using 'rJava'.
    However 'rcdk' exposes functionality in a more idiomatic way. The CDK library itself
    is released as LGPL and the sources can be obtained from <https://github.com/cdk/cdk>.
  license_family: LGPL
  license_file:
    - '{{ environ["PREFIX"] }}/lib/R/share/licenses/LGPL-3'

extra:
  recipe-maintainers:
    - katietz

# The original CRAN metadata for this package was:

# Package: rcdklibs
# Version: 2.3
# Date: 2020-02-22
# Authors@R: c(person('Rajarshi', 'Guha', role=c('aut'), email='rajarshi.guha@gmail.com'), person('Zachary', 'Charlop-Powers', role=c('cre'), email='zach.charlop.powers@gmail.com'), person('CDK Project', '', role=c('ctb', 'cph'), comment='CDK Java library contained in multiple jar files'))
# Depends: R (>= 2.0.0), rJava (>= 0.9-8)
# License: LGPL
# Title: The CDK Libraries Packaged for R
# Description: An R interface to the Chemistry Development Kit, a Java library for chemoinformatics. Given the size of the library itself, this package is not expected to change very frequently. To make use of the CDK within R, it is suggested that you use the 'rcdk' package. Note that it is possible to directly interact with the CDK using 'rJava'. However 'rcdk' exposes functionality in a more idiomatic way. The CDK library itself is released as LGPL and the sources can be obtained from <https://github.com/cdk/cdk>.
# RoxygenNote: 7.0.2
# NeedsCompilation: no
# Packaged: 2020-03-07 20:20:57 UTC; zachpowers
# Author: Rajarshi Guha [aut], Zachary Charlop-Powers [cre], CDK Project [ctb, cph] (CDK Java library contained in multiple jar files)
# Maintainer: Zachary Charlop-Powers <zach.charlop.powers@gmail.com>
# Repository: CRAN
# Date/Publication: 2020-03-08 18:30:02 UTC

# See
# https://docs.conda.io/projects/conda-build for
# more information about meta.yaml
