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

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

source:
  url:
    - {{ cran_mirror }}/src/contrib/prider_{{ version }}.tar.gz
    - {{ cran_mirror }}/src/contrib/Archive/prider/prider_{{ version }}.tar.gz
  sha256: af606194d726239e740d7fa6919d3a19703f0d5494d9fbb04aadf18db652366a

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]
    - cross-r-base {{ r_base }}    # [build_platform != target_platform]
  host:
    - r-base
    - r-rcpp >=1.0.5
    - r-blaster
    - r-dplyr
    - r-gplots
    - r-magrittr
    - r-purrr
    - r-stringr
    - r-tibble
    - r-tidyr
  run:
    - r-base
    - {{ native }}gcc-libs         # [win]
    - r-rcpp >=1.0.5
    - r-blaster
    - r-dplyr
    - r-gplots
    - r-magrittr
    - r-purrr
    - r-stringr
    - r-tibble
    - r-tidyr

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

about:
  home: https://github.com/tamminenlab/prider
  license: BSD-3-Clause
  summary: Implementation of an oligonucleotide primer and probe design algorithm using a linearly
    scaling approximation of set coverage. A detailed description available at Smolander
    and Tamminen, 2021; <doi:10.1101/2021.09.06.459073>.
  license_family: BSD
  license_file:
    - {{ environ["PREFIX"] }}/lib/R/share/licenses/BSD_3_clause
    - LICENSE

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