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

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

source:
  fn: textclean_{{ version }}.tar.gz
  url:
    - {{ cran_mirror }}/src/contrib/textclean_{{ version }}.tar.gz
    - {{ cran_mirror }}/src/contrib/Archive/textclean/textclean_{{ version }}.tar.gz
  sha256: 3f6f3b0abaa3567a1d29f5457087aad31277f3c1473747989c9804479881f24d

build:
  merge_build_host: True  # [win]
  number: 0
  skip: true  # [win32]
  rpaths:
    - lib/R/lib/
    - lib/

requirements:
  build:
    - {{posix}}zip               # [win]
  host:
    - r-base
    - r-data.table
    - r-english >=1.0_2
    - r-glue >=1.3.0
    - r-lexicon >=1.0.0
    - r-mgsub >=1.5.0
    - r-qdapregex
    - r-stringi
    - r-textshape >=1.0.1
  run:
    - r-base
    - r-data.table
    - r-english >=1.0_2
    - r-glue >=1.3.0
    - r-lexicon >=1.0.0
    - r-mgsub >=1.5.0
    - r-qdapregex
    - r-stringi
    - r-textshape >=1.0.1

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

about:
  home: https://github.com/trinker/textclean
  license: GPL-2
  summary: Tools to clean and process text.  Tools are geared at checking for substrings that
    are not optimal for analysis and replacing or removing them (normalizing) with more
    analysis friendly substrings (see Sproat, Black, Chen, Kumar, Ostendorf, & Richards
    (2001) <doi:10.1006/csla.2001.0169>) or extracting them into new variables. For
    example, emoticons are often used in text but not always easily handled by analysis
    algorithms.  The replace_emoticon() function replaces emoticons with word equivalents.
  license_family: GPL2
  license_file: '{{ environ["PREFIX"] }}/lib/R/share/licenses/GPL-2'  # [unix]
  license_file: '{{ environ["PREFIX"] }}\R\share\licenses\GPL-2'  # [win]

extra:
  recipe-maintainers:
    - CurtLH
    - johanneskoester
    - bgruening
    - daler
    - jdblischak
    - cbrueffer
    - dbast
