{% set version = '0.3-0' %}
{% set posix = 'm2-' if win else '' %}
{% set native = 'm2w64-' if win else '' %}
{% set cran_mirror = 'https://cran.r-project.org' %}

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

source:
  fn: PropCIs_{{ version }}.tar.gz
  url:
    - {{ cran_mirror }}/src/contrib/PropCIs_{{ version }}.tar.gz
    - {{ cran_mirror }}/src/contrib/Archive/PropCIs/PropCIs_{{ version }}.tar.gz
  sha256: cd35775f4d36e642663e727450c53708f17b3c4340e1bc2c1752fd17118a9ffb

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('PropCIs')"           # [not win]
    - "\"%R%\" -e \"library('PropCIs')\""  # [win]

about:
  home: https://github.com/shearer/PropCIs
  license: GPL-2 and GPL-3
  summary: Computes two-sample confidence intervals for single, paired and independent proportions.
  license_family: GPL
  license_file: '{{ environ["PREFIX"] }}/lib/R/share/licenses/GPL-2'  # [unix]
  license_file: '{{ environ["PREFIX"] }}\R\share\licenses\GPL-2'  # [win]

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