{% set version = '0.2.2' %}

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

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

source:
  url:
    - {{ cran_mirror }}/src/contrib/BASS_{{ version }}.tar.gz
    - {{ cran_mirror }}/src/contrib/Archive/BASS/BASS_{{ version }}.tar.gz
  sha256: c277f903048d200bf8568afe1cc65fe8fb2ae01e53b4f7df9b31ec282e8c7ae0

build:
  merge_build_host: True  # [win]
  # If this is a new build for the same version, increment the build number.
  number: 0

  # This is required to make R link correctly on Linux.
  rpaths:
    - lib/R/lib/
    - lib/

# Suggests: knitr
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

  run:
    - r-base
    - {{native}}gcc-libs         # [win]

test:
  commands:
    # You can put additional test commands to be run here.
    - $R -e "library('BASS')"           # [not win]
    - "\"%R%\" -e \"library('BASS')\""  # [win]

  # You can also put a file called run_test.py, run_test.sh, or run_test.bat
  # in the recipe that will be run at test time.

  # requires:
    # Put any additional test requirements here.

about:
  home: https://CRAN.R-project.org/package=BASS
  license: GPL-3
  summary: Bayesian fitting and sensitivity analysis methods for adaptive spline surfaces. Built
    to handle continuous and categorical inputs as well as functional or scalar output.
    An extension of the methodology in Denison, Mallick and Smith (1998) <doi:10.1023/A:1008824606259>.
  license_family: GPL3
  license_file: '{{ environ["PREFIX"] }}/lib/R/share/licenses/GPL-3'

extra:
  recipe-maintainers:
    - katietz

# The original CRAN metadata for this package was:

# Package: BASS
# Version: 0.2.2
# Date: 2017-3-15
# Title: Bayesian Adaptive Spline Surfaces
# Description: Bayesian fitting and sensitivity analysis methods for adaptive spline surfaces. Built to handle continuous and categorical inputs as well as functional or scalar output. An extension of the methodology in Denison, Mallick and Smith (1998) <doi:10.1023/A:1008824606259>.
# Authors@R: c(person("Devin", "Francom", role = c("aut", "cre"), email = "devinfrancom@gmail.com"), person("Bruno", "Sanso", role = "ths"), person("Agner", "Fog", role = c("ctb","cph")))
# License: GPL-3
# Suggests: knitr
# VignetteBuilder: knitr
# RoxygenNote: 6.0.1
# NeedsCompilation: yes
# Packaged: 2017-03-16 21:56:04 UTC; francom1
# Author: Devin Francom [aut, cre], Bruno Sanso [ths], Agner Fog [ctb, cph]
# Maintainer: Devin Francom <devinfrancom@gmail.com>
# Repository: CRAN
# Date/Publication: 2017-03-17 07:24:00 UTC

# See
# https://docs.conda.io/projects/conda-build for
# more information about meta.yaml
