{% set version = '1.13.0.1' %}

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

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

source:
  fn: network_{{ version }}.tar.gz
  url:
    - {{ cran_mirror }}/src/contrib/network_{{ version }}.tar.gz
    - {{ cran_mirror }}/src/contrib/Archive/network/network_{{ version }}.tar.gz
  sha256: 60b71983b638c7812ccd986ead438ed7bb2bd8080c01c85d8ea70587275e73ad

build:
  merge_build_host: True  # [win]
  number: 0
  rpaths:
    - lib/R/lib/
    - lib/

# Suggests: sna, statnet.common, testthat
requirements:
  build:
    - {{ compiler('c') }}        # [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('network')"           # [not win]
    - "\"%R%\" -e \"library('network')\""  # [win]

about:
  home: http://statnet.org/
  license: GPL (>= 2)
  summary: Tools to create and modify network objects.  The network class can represent a range
    of relational data types, and supports arbitrary vertex/edge/graph attributes.
  license_family: GPL3

extra:
   recipe-maintainers:
    - dpryan79
    - MathiasHaudgaard
    - FrodePedersen
    - ArneKr
    - Johanneskoester
    - Bgruening
    - Daler
    - Jdblischak
