{% set version = '1.0-15' %}

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

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

source:
  fn: ash_{{ version }}.tar.gz
  url:
    - https://cran.r-project.org/src/contrib/ash_{{ version }}.tar.gz
    - https://cran.r-project.org/src/contrib/Archive/ash/ash_{{ version }}.tar.gz
  sha256: 8b0a7bc39dd0ce2172f09edc5b5e029347d041a4d508bbff3f3fd6f69450c2ab

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

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

requirements:
  build:
    - r-base
    - posix                # [win]
    - {{native}}toolchain  # [win]
    - gcc                  # [not win]
  run:
    - r-base
    - libgcc  # [not win]

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

about:
  home: https://CRAN.R-project.org/package=ash
  license: GPL (>= 2)
  summary: David Scott's ASH routines ported from S-PLUS to R.
  license_family: GPL3

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