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

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

source:
  url:
    - {{ cran_mirror }}/src/contrib/network_{{ version }}.tar.gz
    - {{ cran_mirror }}/src/contrib/Archive/network/network_{{ version }}.tar.gz
  sha256: 9588a198807c8c68da147f479ca9af5bcb4468cf91b6a90b8044d313d9fa30f7

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

requirements:
  build:
    - {{ compiler('c') }}              # [not win]
    - {{ compiler('m2w64_c') }}        # [win]
    - {{ posix }}filesystem        # [win]
    - {{ posix }}make
    - {{ posix }}sed               # [win]
    - {{ posix }}coreutils         # [win]
    - {{ posix }}zip               # [win]
    - cross-r-base {{ r_base }}    # [build_platform != target_platform]
  host:
    - r-base
    - r-magrittr
    - r-statnet.common >=4.4.1
    - r-tibble
  run:
    - r-base
    - {{ native }}gcc-libs         # [win]
    - r-magrittr
    - r-statnet.common >=4.4.1
    - r-tibble

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

about:
  home: http://statnet.org/
  license: GPL-2.0-or-later
  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
  license_file:
    - {{ environ["PREFIX"] }}/lib/R/share/licenses/GPL-3

extra:
  recipe-maintainers:
    - conda-forge/r
    - MathiasHaudgaard
    - FrodePedersen
    - ArneKr
