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

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

source:
  url:
    - {{ cran_mirror }}/src/contrib/TDboost_{{ version }}.tar.gz
    - {{ cran_mirror }}/src/contrib/Archive/TDboost/TDboost_{{ version }}.tar.gz
  sha256: fd073e3b5575a0d946d1d5a1ebe67a1beb58096deb215856a94f2444fcda8969

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-lattice
  run:
    - r-base
    - {{native}}gcc-libs         # [win]
    - r-lattice

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

about:
  home: https://CRAN.R-project.org/package=TDboost
  license: GPL-3
  summary: 'A boosted Tweedie compound Poisson model using the gradient boosting. It is capable
    of fitting a flexible nonlinear Tweedie compound Poisson model (or a gamma model)
    and capturing interactions among predictors. '
  license_family: GPL3
  license_file: '{{ environ["PREFIX"] }}/lib/R/share/licenses/GPL-3'

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

# Package: TDboost
# Title: A Boosted Tweedie Compound Poisson Model
# Version: 1.2
# Date: 2016-03-29
# Author: Yi Yang <yi.yang6@mcgill.ca>, Wei Qian <wxqsma@rit.edu>, Hui Zou <hzou@stat.umn.edu>
# Maintainer: Yi Yang <yi.yang6@mcgill.ca>
# Depends: R (>= 2.12.0), lattice
# Description: A boosted Tweedie compound Poisson model using the gradient boosting. It is capable of fitting a flexible nonlinear Tweedie compound Poisson model (or a gamma model) and capturing interactions among predictors.
# LazyData: yes
# License: GPL-3
# Packaged: 2016-03-30 02:49:54 UTC; yiyang
# NeedsCompilation: yes
# Date/Publication: 2016-03-30 08:14:25
# Repository: CRAN
