{% set version = '0.10-1' %}

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

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

source:
  fn: Rdpack_{{ version }}.tar.gz
  url:
    - {{ cran_mirror }}/src/contrib/Rdpack_{{ version }}.tar.gz
    - {{ cran_mirror }}/src/contrib/Archive/Rdpack/Rdpack_{{ version }}.tar.gz
  sha256: 5b01a737679a7abbd8abcd7d82629a99dcd13c8a00d4f821209b148810b7722d

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

# Suggests: rstudioapi, rprojroot
requirements:
  build:
    - {{posix}}zip               # [win]

  host:
    - r-base
    - r-bibtex >=0.4.0
    - r-gbrd

  run:
    - r-base
    - r-bibtex >=0.4.0
    - r-gbrd

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

about:
  home: https://github.com/GeoBosh/Rdpack
  license: GPL (>= 2)
  summary: Functions for manipulation of R documentation objects, including functions reprompt()
    and ereprompt() for updating 'Rd' documentation for functions, methods and classes;
    'Rd' macros for citations and import of references from 'bibtex' files for use in
    'Rd' files and 'roxygen2' comments; 'Rd' macros for evaluating and inserting snippets
    of 'R' code and the results of its evaluation or creating graphics on the fly; and
    many functions for manipulation of references and Rd files.
  license_family: GPL3

extra:
  recipe-maintainers:
    - dpryan79
    - MathiasHaudgaard
    - FrodePedersen
    - ArneKr
    - johanneskoester
    - bgruening
    - daler
    - jdblischak
