{% set version = '1.16' %}

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

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

source:
  fn: Rsolnp_{{ version }}.tar.gz
  url:
    - https://cran.r-project.org/src/contrib/Rsolnp_{{ version }}.tar.gz
    - https://cran.r-project.org/src/contrib/Archive/Rsolnp/Rsolnp_{{ version }}.tar.gz
  sha256: 3142776062beb8e2b45cdbc4fe6e5446b6d33505253d79f2890fe4178d9cf670

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

  rpaths:
    - lib/R/lib/
    - lib/
requirements:
  build:
    - r-base
    - r-truncnorm

  run:
    - r-base
    - r-truncnorm

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

about:
  home: https://CRAN.R-project.org/package=Rsolnp
  license: GPL
  summary: General Non-linear Optimization Using Augmented Lagrange Multiplier Method.
  license_family: GPL

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