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

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

source:
  url:
    - {{ cran_mirror }}/src/contrib/writexl_{{ version }}.tar.gz
    - {{ cran_mirror }}/src/contrib/Archive/writexl/writexl_{{ version }}.tar.gz
  sha256: 4bbf55dda3491362254000df7c11b2e29ac1bceb2bd387a468bc0083e0864dda

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

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

about:
  home: https://github.com/ropensci/writexl (devel), https://libxlsxwriter.github.io (upstream)
  license: BSD_2_clause
  license_file: LICENSE
  summary: Zero-dependency data frame to xlsx exporter based on 'libxlsxwriter'.  Fast and no Java or Excel required.
  license_family: BSD

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

# Package: writexl
# Type: Package
# Title: Export Data Frames to Excel 'xlsx' Format
# Version: 1.1
# Authors@R: c( person("Jeroen", "Ooms", ,"jeroen@berkeley.edu", role = c("aut", "cre"), comment = c(ORCID = "0000-0002-4035-0289")), person("John McNamara", role = "cph", comment = "Author of libxlsxwriter (see AUTHORS and COPYRIGHT files for details)"))
# Description: Zero-dependency data frame to xlsx exporter based on 'libxlsxwriter'.  Fast and no Java or Excel required.
# License: BSD_2_clause + file LICENSE
# Encoding: UTF-8
# LazyData: true
# URL: https://github.com/ropensci/writexl (devel), https://libxlsxwriter.github.io (upstream)
# BugReports: https://github.com/ropensci/writexl/issues
# RoxygenNote: 6.1.0
# Suggests: spelling, readxl, nycflights13, testthat, bit64
# Language: en-US
# NeedsCompilation: yes
# Packaged: 2018-12-02 14:57:49 UTC; jeroen
# Author: Jeroen Ooms [aut, cre] (<https://orcid.org/0000-0002-4035-0289>), John McNamara [cph] (Author of libxlsxwriter (see AUTHORS and COPYRIGHT files for details))
# Maintainer: Jeroen Ooms <jeroen@berkeley.edu>
# Repository: CRAN
# Date/Publication: 2018-12-02 15:40:03 UTC
