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

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

source:
  url:
    - {{ cran_mirror }}/src/contrib/lpSolveAPI_{{ version }}.tar.gz
    - {{ cran_mirror }}/src/contrib/Archive/lpSolveAPI/lpSolveAPI_{{ version }}.tar.gz
  sha256: df33220e6b541d3c7865ea49feae59c914cc3f6eb9e1249e87cb7b08a7b4ddbd

build:
  merge_build_host: True  # [win]
  number: 1000
  rpaths:
    - lib/R/lib/
    - lib/

requirements:
  build:
    - {{ compiler('c') }}        # [not win]
    - {{native}}toolchain        # [win]
    - {{posix}}filesystem        # [win]
    - {{posix}}make
    - {{posix}}sed               # [win]
    - {{posix}}coreutils         # [win]
    - {{posix}}zip               # [win]
  host:
    - r-base
  run:
    - r-base
    - {{native}}gcc-libs         # [win]

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

about:
  home: https://CRAN.R-project.org/package=lpSolveAPI
  license: LGPL-2
  summary: The lpSolveAPI package provides an R interface to 'lp_solve', a Mixed Integer Linear
    Programming (MILP) solver with support for pure linear, (mixed) integer/binary,
    semi-continuous and special ordered sets (SOS) models.
  license_family: LGPL
  license_file: '{{ environ["PREFIX"] }}/lib/R/share/licenses/LGPL-2'

extra:
  recipe-maintainers:
    - conda-forge/r

# Package: lpSolveAPI
# Version: 5.5.2.0-17
# Date: 2016-01-11
# Title: R Interface to 'lp_solve' Version 5.5.2.0
# Author: lp_solve <http://lpsolve.sourceforge.net/>, Kjell Konis <kjell.konis@me.com>.
# Maintainer: Kjell Konis <kjell.konis@me.com>
# Description: The lpSolveAPI package provides an R interface to 'lp_solve', a Mixed Integer Linear Programming (MILP) solver with support for pure linear, (mixed) integer/binary, semi-continuous and special ordered sets (SOS) models.
# License: LGPL-2
# Repository: CRAN
# Repository/R-Forge/Project: lpsolve
# Repository/R-Forge/Revision: 151
# Repository/R-Forge/DateTimeStamp: 2016-01-11 22:09:07
# Date/Publication: 2016-01-13 08:49:42
# NeedsCompilation: yes
# Packaged: 2016-01-11 22:25:34 UTC; rforge
