{% set version = "0.24.4" %}
{% set posix = 'm2-' if win else '' %}

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

source:
  url:
    - {{ cran_mirror }}/src/contrib/TTR_{{ version }}.tar.gz
    - {{ cran_mirror }}/src/contrib/Archive/TTR/TTR_{{ version }}.tar.gz
  sha256: 89732b9c359bae2f41cd23db649f0897c10fab0702d780c4c25a997322710284

build:
  number: 1
  rpaths:
    - lib/R/lib/
    - lib/

requirements:
  build:
    - cross-r-base {{ r_base }}  # [build_platform != target_platform]
    - r-curl                     # [build_platform != target_platform]
    - r-zoo                      # [build_platform != target_platform]
    - r-xts                      # [build_platform != target_platform]
    - {{ compiler('c') }}              # [not win]
    - {{ stdlib("c") }}                # [not win]
    - {{ compiler('m2w64_c') }}        # [win]
    - {{ stdlib("m2w64_c") }}          # [win]
    - {{ posix }}filesystem        # [win]
    - {{ posix }}make
    - {{ posix }}sed               # [win]
    - {{ posix }}coreutils         # [win]
    - {{ posix }}zip               # [win]
  host:
    - r-base
    - r-curl
    - r-xts >=0.10_0
    - r-zoo
  run:
    - r-base
    - r-curl
    - r-xts >=0.10_0
    - r-zoo

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

about:
  home: https://github.com/joshuaulrich/TTR
  license: GPL-2.0-or-later
  summary: Functions and data to construct technical trading rules with R.
  license_family: GPL2
  license_file:
    - {{ environ["PREFIX"] }}/lib/R/share/licenses/GPL-2

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

# Package: TTR
# Type: Package
# Title: Technical Trading Rules
# Version: 0.23-5
# Author: Joshua Ulrich
# Maintainer: Joshua Ulrich <josh.m.ulrich@gmail.com>
# Imports: xts (>= 0.10-0), zoo, curl
# LinkingTo: xts
# Enhances: quantmod
# Suggests: RUnit
# Description: Functions and data to construct technical trading rules with R.
# License: GPL-2
# URL: https://github.com/joshuaulrich/TTR
# BugReports: https://github.com/joshuaulrich/TTR/issues
# NeedsCompilation: yes
# Packaged: 2019-09-22 18:04:34 UTC; josh
# Repository: CRAN
# Date/Publication: 2019-09-23 08:20:06 UTC
