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

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

source:
  url:
    - {{ cran_mirror }}/src/contrib/RApiSerialize_{{ version }}.tar.gz
    - {{ cran_mirror }}/src/contrib/Archive/RApiSerialize/RApiSerialize_{{ version }}.tar.gz
  sha256: 324d42c655c27b4647d194bfcd7c675da95c67ea3a74ce99853502022792a23e

build:
  merge_build_host: True  # [win]
  number: 1
  rpaths:
    - lib/R/lib/
    - lib/

requirements:
  build:
    - {{ compiler('c') }}              # [not win]
    - {{ compiler('m2w64_c') }}        # [win]
    - {{ compiler('cxx') }}            # [not win]
    - {{ compiler('m2w64_cxx') }}      # [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('RApiSerialize')"           # [not win]
    - "\"%R%\" -e \"library('RApiSerialize')\""  # [win]

about:
  home: https://CRAN.R-project.org/package=RApiSerialize
  license: GPL-2
  summary: This package provides other packages with access to the internal R serialization code.
    Access to this code is provided at the C function level by using the registration
    of native function mechanism. Client packages simply include a single header file
    RApiSerializeAPI.h provided by this package. . This packages builds on the Rhpc
    package by Junji Nakano and Ei-ji Nakama which also includes a (partial) copy of
    the file src/main/serialize.c from R itself. . The R Core group is the original
    author of the serialization code made available by this package.
  license_family: GPL2
  license_file:
    - '{{ environ["PREFIX"] }}/lib/R/share/licenses/GPL-2'

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

# Package: RApiSerialize
# Type: Package
# Title: R API Serialization
# Version: 0.1.0
# Date: 2014-04-19
# Author: Dirk Eddelbuettel, Junji Nakano, Ei-ji Nakama, and R Core (original code)
# Maintainer: Dirk Eddelbuettel <edd@debian.org>
# Description: This package provides other packages with access to the internal R serialization code. Access to this code is provided at the C function level by using the registration of native function mechanism. Client packages simply include a single header file RApiSerializeAPI.h provided by this package. . This packages builds on the Rhpc package by Junji Nakano and Ei-ji Nakama which also includes a (partial) copy of the file src/main/serialize.c from R itself. . The R Core group is the original author of the serialization code made available by this package.
# License: GPL (>= 2)
# Packaged: 2014-04-19 13:45:33.622462 UTC; edd
# NeedsCompilation: yes
# Repository: CRAN
# Date/Publication: 2014-04-19 18:49:29
