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

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

source:
  url:
    - {{ cran_mirror }}/src/contrib/striprtf_{{ version }}.tar.gz
    - {{ cran_mirror }}/src/contrib/Archive/striprtf/striprtf_{{ version }}.tar.gz
  sha256: 260c6c7027b3bfd9c5dc98e9a14e95b9429ff33954f6dd6bad40a2e506d40c37

build:
  merge_build_host: true  # [win]
  number: 0
  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
    - r-rcpp
    - r-magrittr
    - r-stringr
  run:
    - r-base
    - {{ native }}gcc-libs         # [win]
    - r-rcpp
    - r-magrittr
    - r-stringr

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

about:
  home: https://github.com/kota7/striprtf
  license: MIT
  summary: Extracts plain text from RTF (Rich Text Format) file.
  license_family: MIT
  license_file: {{ environ["PREFIX"] }}/lib/R/share/licenses/MIT

extra:
  recipe-maintainers:
    - mxr-conda
    - oblute
    - rluria14
    - ndmaxar
    - conda-forge/r

# The original CRAN metadata for this package was:

# Package: striprtf
# Type: Package
# Title: Extract Text from RTF File
# Version: 0.5.2
# Authors@R: c( person("Kota", "Mori", email = "kmori05@gmail.com", role = c("aut", "cre")) )
# Description: Extracts plain text from RTF (Rich Text Format) file.
# License: MIT + file LICENSE
# LazyData: TRUE
# Depends: R (>= 3.0)
# Imports: magrittr, Rcpp, stringr, utils
# Suggests: testthat
# RoxygenNote: 6.0.1
# LinkingTo: Rcpp
# URL: https://github.com/kota7/striprtf
# BugReports: https://github.com/kota7/striprtf/issues
# NeedsCompilation: yes
# Packaged: 2019-01-03 06:30:53 UTC; kota
# Author: Kota Mori [aut, cre]
# Maintainer: Kota Mori <kmori05@gmail.com>
# Repository: CRAN
# Date/Publication: 2019-01-03 09:30:03 UTC

# See
# https://docs.conda.io/projects/conda-build for
# more information about meta.yaml
