{% set version = '0.1.4' %}

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

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

source:
  fn: wrassp_{{ version }}.tar.gz
  url:
    - https://cran.r-project.org/src/contrib/wrassp_{{ version }}.tar.gz
    - https://cran.r-project.org/src/contrib/Archive/wrassp/wrassp_{{ version }}.tar.gz
  sha256: f6853cba00cd8350b2fb9d140f8cd385ff6e14dee6f7de260c93023079ff3070

build:
  number: 0
  skip: true  # [win32]

  rpaths:
    - lib/R/lib/
    - lib/

requirements:
  build:
    - r-base
    - posix                # [win]
    - {{native}}toolchain  # [win]
    - gcc                  # [not win]

  run:
    - r-base
    - libgcc  # [not win]

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

about:
  home: https://github.com/IPS-LMU/wrassp
  license: GPL (>= 3)
  summary: A wrapper around Michel Scheffers's libassp (Advanced Speech Signal Processor). The
    libassp library aims at providing functionality for handling speech signal files
    in most common audio formats and for performing analyses common in phonetic science/speech
    science. This includes the calculation of formants, fundamental frequency, root
    mean square, auto correlation, a variety of spectral analyses, zero crossing rate,
    filtering etc. This wrapper provides R with a large subset of libassp's signal processing
    functions and provides them to the user in a (hopefully) user-friendly manner.
  license_family: GPL3

extra:
  recipe-maintainers:
    - johanneskoester
    - bgruening
    - daler
