{% set version = '0.2.45' %}

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

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

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

  sha256: 0370373065d1b999f61b173e7b404ccec8f68a823f7afb838a97774bc1057857

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

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

requirements:
  build:
    - r-base
    - r-rcpp
    - posix                # [win]
    - {{native}}toolchain  # [win]
    - gcc                  # [not win]

  run:
    - r-base
    - r-rcpp
    - libgcc  # [not win]

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

about:
  home: https://cran.r-project.org/web/packages/protViz/index.html
  license: GPL-3
  summary: Helps with quality checks, visualizations  and analysis of mass spectrometry data,
    coming from proteomics  experiments. The package is developed, tested and used at
    the Functional  Genomics Center Zurich. We use this package mainly for prototyping,  teaching,
    and having fun with proteomics data. But it can also be  used to do data analysis
    for small scale data sets.
  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
