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

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

source:
  fn: sna_{{ version }}.tar.gz
  url:
    - {{ cran_mirror }}/src/contrib/sna_{{ version }}.tar.gz
    - {{ cran_mirror }}/src/contrib/Archive/sna/sna_{{ version }}.tar.gz
  sha256: 13b508cacb0bf1e79b55d5c8f7e9ada3b173468d4d6d5f1dc606990ac03071c8

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

  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]

  host:
    - r-base
    - r-network
    - r-statnet.common

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

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

about:
  home: http://www.statnet.org
  license: GPL (>= 2)
  summary: A range of tools for social network analysis, including node and graph-level indices,
    structural distance and covariance methods, structural equivalence detection, network
    regression, random graph generation, and 2D/3D network visualization.
  license_family: GPL3
  license_file: '{{ environ["PREFIX"] }}/lib/R/share/licenses/GPL-3'

extra:
  recipe-maintainers:
    - conda-forge/r
    - stevierene82
