{% set version = '1.2.0' %}

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

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

source:
  fn: RefManageR_{{ version }}.tar.gz
  url:
    - {{ cran_mirror }}/src/contrib/RefManageR_{{ version }}.tar.gz
    - {{ cran_mirror }}/src/contrib/Archive/RefManageR/RefManageR_{{ version }}.tar.gz
  sha256: 6cf29680c38a131fc217d716071667be2b63ca5cb8ea70188461939a643d8126

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

# Suggests: knitr, testthat
requirements:
  build:
    - {{posix}}zip               # [win]

  host:
    - r-base
    - r-bibtex >=0.4.1
    - r-httr
    - r-jsonlite
    - r-lubridate >=1.5.0
    - r-plyr
    - r-stringr
    - r-xml2

  run:
    - r-base
    - r-bibtex >=0.4.1
    - r-httr
    - r-jsonlite
    - r-lubridate >=1.5.0
    - r-plyr
    - r-stringr
    - r-xml2

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

about:
  home: https://github.com/ropensci/RefManageR/
  license: GPL-2 | GPL-3 | BSD_3_clause
  summary: Provides tools for importing and working with bibliographic references. It greatly
    enhances the 'bibentry' class by providing a class 'BibEntry' which stores 'BibTeX'
    and 'BibLaTeX' references, supports 'UTF-8' encoding, and can be easily searched
    by any field, by date ranges, and by various formats for name lists (author by last
    names, translator by full names, etc.). Entries can be updated, combined, sorted,
    printed in a number of styles, and exported. 'BibTeX' and 'BibLaTeX' '.bib' files
    can be read into 'R' and converted to 'BibEntry' objects. Interfaces to 'NCBI Entrez',
    'CrossRef', and 'Zotero' are provided for importing references and references can
    be created from locally stored 'PDF' files using 'Poppler'. Includes functions for
    citing and generating a bibliography with hyperlinks for documents prepared with
    'RMarkdown' or 'RHTML'.
  license_family: GPL3

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