{% set version = "3.4.3" %}
{% set posix = 'm2-' 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: 051e7332e3074db826efef9059067721864f9d70adc55bbcae3a72e5ae83913a

build:
  number: 0
  rpaths:
    - lib/R/lib/
    - lib/

requirements:
  build:
    - cross-r-base {{ r_base }}  # [build_platform != target_platform]
    - {{ compiler('c') }}              # [not win]
    - {{ stdlib("c") }}                # [not win]
    - {{ compiler('m2w64_c') }}        # [win]
    - {{ stdlib("m2w64_c") }}          # [win]
    - {{ posix }}filesystem        # [win]
    - {{ posix }}make
    - {{ posix }}sed               # [win]
    - {{ posix }}coreutils         # [win]
    - {{ posix }}zip               # [win]
  host:
    - r-base
  run:
    - r-base

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

about:
  home: https://github.com/jeroen/sys
  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
  license_file:
    - {{ environ["PREFIX"] }}/lib/R/share/licenses/MIT
    - LICENSE

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

# Package: sys
# Type: Package
# Title: Powerful and Reliable Tools for Running System Commands in R
# Version: 3.3
# 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
# 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-08-21 11:45:42 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-08-21 14:20:02 UTC
