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

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

source:
  fn: gee_{{ version }}.tar.gz
  url:
    - {{ cran_mirror }}/src/contrib/gee_{{ version }}.tar.gz
    - {{ cran_mirror }}/src/contrib/Archive/gee/gee_{{ version }}.tar.gz
  sha256: ebd3eb754b338dc8d89a35fff149af57c1be3aa2eb6162912c7cc52a8572c292

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

requirements:
  build:
    - {{ compiler('c') }}        # [not win]
    - {{ compiler('fortran') }}  # [not win]
    - {{native}}toolchain        # [win]
    - {{posix}}filesystem        # [win]
    - {{posix}}make
    - {{posix}}sed               # [win]
    - {{posix}}coreutils         # [win]
    - {{posix}}zip               # [win]
  host:
    - r-base
  run:
    - r-base
    - {{native}}gcc-libs         # [win]

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

about:
  home: https://CRAN.R-project.org/package=gee
  license: GPL-2
  summary: Generalized Estimation Equation solver.
  license_family: GPL2
  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
