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

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

source:
  url:
    - {{ cran_mirror }}/src/contrib/bsts_{{ version }}.tar.gz
    - {{ cran_mirror }}/src/contrib/Archive/bsts/bsts_{{ version }}.tar.gz
  sha256: af0f0df5c5eb9398493ad07ad51c48f891672b6921590e19b0bc79485e515d2c

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-boom >=0.9.6
    - r-boomspikeslab >=1.2.3
    - r-xts
    - r-zoo >=1.8
  run:
    - r-base
    - {{ native }}gcc-libs         # [win]
    - r-boom >=0.9.6
    - r-boomspikeslab >=1.2.3
    - r-xts
    - r-zoo >=1.8

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

about:
  home: https://CRAN.R-project.org/package=bsts
  license: LGPL-2.1-only
  summary: Time series regression using dynamic linear models fit using MCMC. See Scott and Varian (2014) <DOI:10.1504/IJMMNO.2014.059942>, among many other sources.
  license_family: LGPL
  license_file:
    - {{ environ["PREFIX"] }}/lib/R/share/licenses/LGPL-2.1
    - LICENSE

extra:
  recipe-maintainers:
    - conda-forge/r
    - Yue-Li-atBain

# Package: bsts
# Version: 0.9.5
# Date: 2020-04-29
# Title: Bayesian Structural Time Series
# Author: Steven L. Scott <steve.the.bayesian@gmail.com>
# Maintainer: Steven L. Scott <steve.the.bayesian@gmail.com>
# Description: Time series regression using dynamic linear models fit using MCMC. See Scott and Varian (2014) <DOI:10.1504/IJMMNO.2014.059942>, among many other sources.
# Depends: BoomSpikeSlab (>= 1.2.3), zoo (>= 1.8), xts, Boom (>= 0.9.6), R(>= 3.4.0)
# Suggests: testthat
# LinkingTo: Boom (>= 0.9.6)
# License: LGPL-2.1 | file LICENSE
# Encoding: UTF-8
# NeedsCompilation: yes
# Packaged: 2020-05-01 14:24:35 UTC; steve
# Repository: CRAN
# Date/Publication: 2020-05-02 15:00:02 UTC
