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

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

source:
  url:
    - {{ cran_mirror }}/src/contrib/Corbi_{{ version }}.tar.gz
    - {{ cran_mirror }}/src/contrib/Archive/Corbi/Corbi_{{ version }}.tar.gz
  sha256: 82c0478c1009a0a06fda1b48a4411942fb89da74b6c99a0af9ef66c79c818b8e

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-crf
    - r-mass
    - r-matrix
    - r-igraph
  run:
    - r-base
    - {{ native }}gcc-libs         # [win]
    - r-crf
    - r-mass
    - r-matrix
    - r-igraph

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

about:
  home: https://github.com/wulingyun/Corbi
  license: GPL-2.0-or-later
  summary: Provides a bundle of basic and fundamental bioinformatics tools, such as network querying and alignment, subnetwork extraction and search, network biomarker identification.
  license_family: GPL3
  license_file:
    - {{ environ["PREFIX"] }}/lib/R/share/licenses/GPL-2

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