{% set version = "1.3.10" %}

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

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

source:
  fn: emdbook_{{ version }}.tar.gz
  url:
    - https://cran.r-project.org/src/contrib/emdbook_{{ version }}.tar.gz
    - https://cran.r-project.org/src/contrib/Archive/emdbook/emdbook_{{ version }}.tar.gz
  sha256: bbc25496daea534e9919bc84a98e7f0051f72298a2d9fe457b3b559c4d670021

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

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

requirements:
  build:
    - r-base
    - r-mass
    - r-bbmle
    - r-coda
    - r-lattice
    - r-plyr

  run:
    - r-base
    - r-mass
    - r-bbmle
    - r-coda
    - r-lattice
    - r-plyr

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

about:
  home: http://www.math.mcmaster.ca/bolker/emdbook
  license: GPL
  summary: Auxiliary functions and data sets for "Ecological Models and Data", a book presenting
    maximum likelihood estimation and related topics for ecologists (ISBN 978-0-691-12522-0).
  license_family: GPL

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