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

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

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

source:
  fn: SQUAREM_{{ version }}.tar.gz
  url:
    - https://cran.r-project.org/src/contrib/SQUAREM_{{ version }}.tar.gz
    - https://cran.r-project.org/src/contrib/Archive/SQUAREM/SQUAREM_{{ version }}.tar.gz
  sha256: 9b89905b436f1cf3faa9e3dabc585a76299e729e85ca659bfddb4b7cba11b283

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

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

requirements:
  build:
    - r-base

  run:
    - r-base

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

about:
  home: http://www.jhsph.edu/agingandhealth/People/Faculty_personal_pages/Varadhan.html
  license: GPL (>= 2)
  summary: Algorithms for accelerating the convergence of slow, monotone sequences from smooth,
    contraction mapping such as the EM algorithm. It can be used to accelerate any smooth,
    linearly convergent acceleration scheme.  A tutorial style introduction to this
    package is available in a vignette on the CRAN download page or, when the package
    is loaded in an R session, with vignette("SQUAREM").
  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:
    - jdblischak
    - johanneskoester
    - bgruening
    - daler
    - rvalieris
