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

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

source:
  fn: ISwR_{{ version }}.tar.gz
  url:
    - {{ cran_mirror }}/src/contrib/ISwR_{{ version }}.tar.gz
    - {{ cran_mirror }}/src/contrib/Archive/ISwR/ISwR_{{ version }}.tar.gz
  sha256: cf1ebf207e62b835c73ec1a09fc4e5496e671f39b3595a94478c724477e6a1e5

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

requirements:
  build:
    - {{posix}}zip               # [win]
  host:
    - r-base
  run:
    - r-base

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

about:
  home: https://CRAN.R-project.org/package=ISwR
  license: GPL (>= 2)
  summary: 'Data sets and scripts for text examples and exercises in  P. Dalgaard (2008), `Introductory
    Statistics with R'', 2nd ed., Springer Verlag, ISBN 978-0387790534.  '
  license_family: GPL3
  license_file: '{{ environ["PREFIX"] }}/lib/R/share/licenses/GPL-3'  # [unix]
  license_file: '{{ environ["PREFIX"] }}\R\share\licenses\GPL-3'  # [win]

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