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

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

source:
  url:
    - {{ cran_mirror }}/src/contrib/leaps_{{ version }}.tar.gz
    - {{ cran_mirror }}/src/contrib/Archive/leaps/leaps_{{ version }}.tar.gz
  sha256: 3d7c3a102ce68433ecf167ece96a7ebb4207729e4defd0ac8fc00e7003f5c3b6

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

requirements:
  build:
    - {{ compiler('c') }}              # [not win]
    - {{ compiler('m2w64_c') }}        # [win]
    - {{ compiler('fortran') }}        # [not win]
    - {{ compiler('m2w64_fortran') }}  # [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('leaps')"           # [not win]
    - "\"%R%\" -e \"library('leaps')\""  # [win]

about:
  home: https://CRAN.R-project.org/package=leaps
  license: GPL-2.0-or-later
  summary: Regression subset selection, including exhaustive search.
  license_family: GPL2
  license_file:
    - '{{ environ["PREFIX"] }}/lib/R/share/licenses/GPL-2'

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

# Package: leaps
# Title: Regression Subset Selection
# Version: 3.1
# Author: Thomas Lumley based on Fortran code by Alan Miller
# Description: Regression subset selection, including exhaustive search.
# Depends:
# Suggests: biglm
# License: GPL (>= 2)
# Maintainer: Thomas Lumley <t.lumley@auckland.ac.nz>
# NeedsCompilation: yes
# Packaged: 2020-01-15 22:46:02 UTC; tlum005
# Repository: CRAN
# Date/Publication: 2020-01-16 17:50:05 UTC
