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

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

source:
  fn: networkDynamic_{{ version }}.tar.gz
  url:
    - {{ cran_mirror }}/src/contrib/networkDynamic_{{ version }}.tar.gz
    - {{ cran_mirror }}/src/contrib/Archive/networkDynamic/networkDynamic_{{ version }}.tar.gz
  sha256: e951d4bc892f96d867a8f5822d662633f9206f2dadf46caaa6083fc0d97289a4

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

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

requirements:
  build:
    - {{ compiler('c') }}        # [not win]
    - {{native}}toolchain        # [win]
    - {{posix}}filesystem        # [win]
    - {{posix}}make
    - {{posix}}sed  # [win]
    - {{posix}}coreutils  # [win]

  host:
    - r-base
    - r-network >=1.13
    - r-statnet.common

  run:
    - r-base
    - {{native}}gcc-libs         # [win]
    - r-network >=1.13
    - r-statnet.common

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

about:
  home: http://statnet.org
  license: GPL-3
  summary: Simple interface routines to facilitate the handling of network objects with complex
    intertemporal data. This is a part of the "statnet" suite of packages for network
    analysis.
  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:
    - johanneskoester
    - bgruening
    - daler
    - jdblischak
    - cbrueffer
    - stevierene82
