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

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

source:
  url:
    - {{ cran_mirror }}/src/contrib/RSclient_{{ version }}.tar.gz
    - {{ cran_mirror }}/src/contrib/Archive/RSclient/RSclient_{{ version }}.tar.gz
  sha256: d04c50b027b4c2a0ab3ed8c47ae54e3d8014afe0cc8f309ede31d9c8aae1ab1e

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]
    - {{ posix }}gzip              # [win]
    - {{ posix }}tar               # [win]
    - cross-r-base {{ r_base }}    # [build_platform != target_platform]
  host:
    - r-base
  run:
    - r-base
    - openssl
    - {{ native }}gcc-libs         # [win]

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

about:
  home: http://www.rforge.net/RSclient/
  license: GPL-2.0-only
  summary: Client for Rserve, allowing to connect to Rserve instances and issue commands.
  license_family: GPL2
  license_file:
    - '{{ environ["PREFIX"] }}/lib/R/share/licenses/GPL-2'
    - LICENSE

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

# Package: RSclient
# Version: 0.7-3
# Title: Client for Rserve
# Author: Simon Urbanek <Simon.Urbanek@r-project.org>
# Maintainer: Simon Urbanek <Simon.Urbanek@r-project.org>
# Depends: R (>= 2.7.0)
# Description: Client for Rserve, allowing to connect to Rserve instances and issue commands.
# License: GPL-2 | file LICENSE
# URL: http://www.rforge.net/RSclient/
# NeedsCompilation: yes
# Packaged: 2015-07-27 21:09:21 UTC; svnuser
# Repository: CRAN
# Date/Publication: 2015-07-28 08:03:34
