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

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

source:
  fn: aggregation_{{ version }}.tar.gz
  url:
    - {{ cran_mirror }}/src/contrib/aggregation_{{ version }}.tar.gz
    - {{ cran_mirror }}/src/contrib/Archive/aggregation/aggregation_{{ version }}.tar.gz
  sha256: 86f88a02479ddc8506bafb154117ebc3b1a4a44fa308e0193c8c315109302f49

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

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

requirements:
  build:
    - {{posix}}zip               # [win]

  host:
    - r-base

  run:
    - r-base

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

about:
  home: https://CRAN.R-project.org/package=aggregation
  license: GPL-3
  summary: 'Contains functionality for performing the following methods of p-value aggregation:
    Fisher''s method [Fisher, RA (1932, ISBN: 9780028447308)], the Lancaster method
    (weighted Fisher''s method) [Lancaster, HO (1961, <doi:10.1111/j.1467-842X.1961.tb00058.x>)],
    and Sidak correction [Sidak, Z (1967, <doi:10.1080/01621459.1967.10482935>)].  Please
    cite Yi et al., the manuscript corresponding to this package [Yi, L et al., (2017),
    <doi:10.1101/190199>].'

  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:
    - apcamargo
