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

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

source:
  url:
    - {{ cran_mirror }}/src/contrib/pingr_{{ version }}.tar.gz
    - {{ cran_mirror }}/src/contrib/Archive/pingr/pingr_{{ version }}.tar.gz
  sha256: f079c866c80232d5b56fd19e3fbfe6128cc89f5d9f39ef5439ca3cd63371c750

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]
  host:
    - r-base
    - r-processx
  run:
    - r-base
    - {{native}}gcc-libs         # [win]
    - r-processx

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

about:
  home: https://github.com/r-lib/pingr#readme
  license: MIT
  summary: Check if a remote computer is up. It can either just call the system ping command,
    or check a specified TCP port.
  license_family: MIT
  license_file: '{{ environ["PREFIX"] }}/lib/R/share/licenses/MIT'

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

# Package: pingr
# Title: Check if a Remote Computer is Up
# Version: 1.2.0
# Authors@R: person(given = "Gabor", family = "Csardi", role = c("aut", "cre"), email = "csardi.gabor@gmail.com")
# Description: Check if a remote computer is up. It can either just call the system ping command, or check a specified TCP port.
# License: MIT + file LICENSE
# LazyData: true
# URL: https://github.com/r-lib/pingr#readme
# BugReports: https://github.com/r-lib/pingr/issues
# Suggests: covr, testthat
# Imports: processx
# RoxygenNote: 6.1.99.9001
# Encoding: UTF-8
# NeedsCompilation: yes
# Packaged: 2019-10-09 12:08:51 UTC; gaborcsardi
# Author: Gabor Csardi [aut, cre]
# Maintainer: Gabor Csardi <csardi.gabor@gmail.com>
# Repository: CRAN
# Date/Publication: 2019-10-09 13:50:02 UTC
