{% set version = "1.5.2" %}

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

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

source:
  fn: pscl_{{ version }}.tar.gz
  url:
    - https://cran.r-project.org/src/contrib/pscl_{{ version }}.tar.gz
    - https://cran.r-project.org/src/contrib/Archive/pscl/pscl_{{ version }}.tar.gz
  sha256: 2c9fe648485c6b54c6f95a54b6e00ffe3cf06fa8c5c68f1d669664a7b91a0ede

build:
  merge_build_host: True  # [win]
  number: 2
  skip: true  # [win32]

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

requirements:
  build:
    - posix                # [win]
    - {{ compiler('c') }}        # [unix]
    - {{ compiler('m2w64_c') }}  # [win]
  host:
    - r-base
    - r-mass
    - r-lattice

  run:
    - r-base
    - r-mass
    - r-lattice

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

about:
  home: http://pscl.stanford.edu/
  license: GPL-2
  summary: Bayesian analysis of item-response theory (IRT) models, roll call analysis; computing
    highest density regions; maximum likelihood estimation of zero-inflated and hurdle
    models for count data; goodness-of-fit measures for GLMs; data sets used in writing and
    teaching at the Political Science Computational Laboratory; seats-votes curves.
  license_family: GPL2

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