{% set version = '2.8.1' %}

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

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

source:
  fn: readMzXmlData_{{ version }}.tar.gz
  url:
    - https://cran.r-project.org/src/contrib/readMzXmlData_{{ version }}.tar.gz
    - https://cran.r-project.org/src/contrib/Archive/readMzXmlData/readMzXmlData_{{ version }}.tar.gz

  sha256: 1c3d842d2a647020e19d42a448578e8bd48b4bbe56d8927c8d239623a582960e

build:
  number: 0
  skip: true  # [win32]

  rpaths:
    - lib/R/lib/
    - lib/

requirements:
  build:
    - r-base
    - r-xml
    - r-base64enc
    - r-digest

  run:
    - r-base
    - r-xml
    - r-base64enc
    - r-digest

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

about:
  home: https://cran.r-project.org/web/packages/readMzXmlData/index.html
  license: GPL (>= 3)
  summary: Functions for reading mass spectrometry data in mzXML format.
  license_family: GPL3
  license_file: '{{ environ["PREFIX"] }}\/lib\/R\/share\/licenses\/GPL-3'  # [unix]
  license_file: '{{ environ["PREFIX"] }}\R\share\licenses\GPL-3'  # [win]
extra:
   recipe-maintainers:
    - MathiasHaudgaard
    - FrodePedersen
    - ArneKr
    - johanneskoester
    - bgruening
    - daler
    - jdblischak
