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

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

source:
  fn: subselect_{{ version }}.tar.gz
  url:
    - {{ cran_mirror }}/src/contrib/subselect_{{ version }}.tar.gz
    - {{ cran_mirror }}/src/contrib/Archive/subselect/subselect_{{ version }}.tar.gz
  sha256: 3461795eedb5c267a1168e12c4043fda7801d728e90b2692aa40a520e4b54e0f

build:
  merge_build_host: True  # [win]
  number: 1002
  skip: true  # [win32]
  rpaths:
    - lib/R/lib/
    - lib/

requirements:
  build:
    - {{ compiler('c') }}        # [not win]
    - {{ compiler('cxx') }}      # [not win]
    - {{ compiler('fortran') }}  # [not win]
    - {{ compiler('m2w64_c') }}        # [win]
    - {{ compiler('m2w64_cxx') }}        # [win]
    - {{ compiler('m2w64_fortran') }}        # [win]
    - {{posix}}filesystem        # [win]
    - {{posix}}make
    - {{posix}}sed               # [win]
    - {{posix}}coreutils         # [win]
    - {{posix}}zip               # [win]
  host:
    - r-base
    - r-iswr
    - r-mass
    - r-corpcor
  run:
    - r-base
    - {{native}}gcc-libs         # [win]
    - r-iswr
    - r-mass
    - r-corpcor

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

about:
  home: https://CRAN.R-project.org/package=subselect
  license: GPL (>= 2)
  summary: A collection of functions which (i) assess the quality of variable subsets as surrogates
    for a full data set, in either an exploratory data analysis or in the context of
    a multivariate linear model, and (ii) search for subsets which are optimal under
    various criteria.
  license_family: GPL3
  license_file: '{{ environ["PREFIX"] }}/lib/R/share/licenses/GPL-3'

extra:
  recipe-maintainers:
    - conda-forge/r
    - johanneskoester
    - bgruening
    - daler
    - jdblischak
    - cbrueffer
    - dbast
