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

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

source:
  url:
    - {{ cran_mirror }}/src/contrib/rbamtools_{{ version }}.tar.gz
    - {{ cran_mirror }}/src/contrib/Archive/rbamtools/rbamtools_{{ version }}.tar.gz
  sha256: 0c3e067b826493d200b9ac9040d7f0dfb11ac65b79b60074127ba8dd243d4362

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-refgenome >=1.6.1
  run:
    - r-base
    - {{native}}gcc-libs         # [win]
    - r-refgenome >=1.6.1

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

about:
  home: https://CRAN.R-project.org/package=rbamtools
  license: Artistic-2.0
  summary: Provides an R interface to functions of the 'SAMtools' C-Library by Heng Li <http://www.htslib.org/>.
  license_family: OTHER
  license_file:
    - '{{ environ["PREFIX"] }}/lib/R/share/licenses/Artistic-2.0'

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

# Package: rbamtools
# Type: Package
# Title: Read and Write BAM (Binary Alignment) Files
# Version: 2.16.17
# Date: 2019-11-08
# Authors@R: c(person("Wolfgang", "Kaisers", role=c("aut", "cre"), email="wolfgang.kaisers@gmail.com", comment = c(ORCID = "0000-0002-1923-3088")), person("Heng", "Li", role=c("ctb", "cph"), email="lh3@sanger.ac.uk"), person("Jue", "Ruan", role=c("ctb", "cph"), email="ruanjue@gmail.com"))
# Description: Provides an R interface to functions of the 'SAMtools' C-Library by Heng Li <http://www.htslib.org/>.
# License: Artistic-2.0
# Copyright: file inst/COPYRIGHTS
# LazyLoad: yes
# Depends: methods,refGenome (>= 1.6.1)
# Suggests: xtable
# Collate: rbamtools.R segmentize.R sampleBamFiles.R
# Packaged: 2019-11-11 08:02:08 UTC; wolfgang
# Repository: CRAN
# Date/Publication: 2019-11-11 09:40:02 UTC
# NeedsCompilation: yes
# Maintainer: Wolfgang Kaisers <wolfgang.kaisers@gmail.com>
# Author: Wolfgang Kaisers [aut, cre] (<https://orcid.org/0000-0002-1923-3088>), Heng Li [ctb, cph], Jue Ruan [ctb, cph]
