{% set version = '0.11-0' %}

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

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

source:
  fn: rARPACK_{{ version }}.tar.gz
  url:
    - https://cran.r-project.org/src/contrib/rARPACK_{{ version }}.tar.gz
    - https://cran.r-project.org/src/contrib/Archive/rARPACK/rARPACK_{{ version }}.tar.gz
  sha256: c33401e2e31d272d485ce2ed22e7fe43ac641fd7c0a45a9b848d3ad60df1028a

build:
  number: 0
  rpaths:
    - lib/R/lib/
    - lib/
  skip: True  # [win32]

requirements:
  build:
    - r-base
    - r-rspectra
  run:
    - r-base
    - r-rspectra

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

about:
  home: https://github.com/yixuan/rARPACK
  license: BSD_3_clause
  summary: Previously an R wrapper of the 'ARPACK' library <http://www.caam.rice.edu/software/ARPACK/>,
    and now a shell of the R package 'RSpectra', an R interface to the 'Spectra' library
    <http://yixuan.cos.name/spectra/> for solving large scale eigenvalue/vector problems.
    The current version of 'rARPACK' simply imports and exports the functions provided
    by 'RSpectra'. New users of 'rARPACK' are advised to switch to the 'RSpectra' package.
  license_family: BSD

extra:
  recipe-maintainers:
    - cbrueffer
    - johanneskoester
    - bgruening
    - daler
    - jdblischak
