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

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

source:
  url:
    - {{ cran_mirror }}/src/contrib/sys_{{ version }}.tar.gz
    - {{ cran_mirror }}/src/contrib/Archive/sys/sys_{{ version }}.tar.gz
  sha256: 98088e01e7682077569ed8a5f767c59b34172d6240af3c7462270fa83ce3432a

build:
  merge_build_host: True  # [win]
  number: 0
  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]
    - {{posix}}zip               # [win]
  host:
    - r-base
  run:
    - r-base
    - {{native}}gcc-libs         # [win]

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

about:
  home: https://github.com/jeroen/sys#readme
  license: MIT
  summary: Drop-in replacements for the base system2() function with fine control and consistent
    behavior across platforms. Supports clean interruption, timeout,  background tasks,
    and streaming STDIN / STDOUT / STDERR over binary or text  connections. Arguments
    on Windows automatically get encoded and quoted to work  on different locales.
  license_family: MIT

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

# Package: sys
# Type: Package
# Title: Powerful and Reliable Tools for Running System Commands in R
# Version: 3.1
# Authors@R: c(person("Jeroen", "Ooms", role = c("aut", "cre"),  email = "jeroen@berkeley.edu", comment = c(ORCID = "0000-0002-4035-0289")), person("Gabor", "Csardi", , "csardi.gabor@gmail.com", role = "ctb"))
# Description: Drop-in replacements for the base system2() function with fine control and consistent behavior across platforms. Supports clean interruption, timeout,  background tasks, and streaming STDIN / STDOUT / STDERR over binary or text  connections. Arguments on Windows automatically get encoded and quoted to work  on different locales.
# License: MIT + file LICENSE
# URL: https://github.com/jeroen/sys#readme
# BugReports: https://github.com/jeroen/sys/issues
# Encoding: UTF-8
# LazyData: true
# RoxygenNote: 6.1.1
# Suggests: unix (>= 1.4), spelling, testthat
# Language: en-US
# NeedsCompilation: yes
# Packaged: 2019-03-10 17:35:59 UTC; jeroen
# Author: Jeroen Ooms [aut, cre] (<https://orcid.org/0000-0002-4035-0289>), Gabor Csardi [ctb]
# Maintainer: Jeroen Ooms <jeroen@berkeley.edu>
# Repository: CRAN
# Date/Publication: 2019-03-10 20:40:03 UTC
