{% set version = '1.3.2' %}

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

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

source:
  url:
    - {{ cran_mirror }}/src/contrib/unmarked_{{ version }}.tar.gz
    - {{ cran_mirror }}/src/contrib/Archive/unmarked/unmarked_{{ version }}.tar.gz
  sha256: a1d21619c8627419e09646cc12e09457c0ea8989caf2e674d032e59b310cf883

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

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

# Suggests: knitr, rmarkdown, pkgdown, raster, shiny, terra, testthat
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-mass
    - r-matrix
    - r-rcpp >=0.8.0
    - r-rcpparmadillo
    - r-rcppeigen
    - r-tmb >=1.7.18
    - r-lattice
    - r-lme4
    - r-pbapply

  run:
    - r-base
    - {{native}}gcc-libs         # [win]
    - r-mass
    - r-matrix
    - r-rcpp >=0.8.0
    - r-rcpparmadillo
    - r-rcppeigen
    - r-tmb >=1.7.18
    - r-lattice
    - r-lme4
    - r-pbapply

test:
  commands:
    # You can put additional test commands to be run here.
    - $R -e "library('unmarked')"           # [not win]
    - "\"%R%\" -e \"library('unmarked')\""  # [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://groups.google.com/d/forum/unmarked, https://rbchan.github.io/unmarked/, https://github.com/ianfiske/unmarked,
    https://github.com/rbchan/unmarked
  license: GPL-3
  summary: 'Fits hierarchical models of animal abundance and occurrence to data collected using
    survey methods such as point counts, site occupancy sampling, distance sampling,
    removal sampling, and double observer sampling. Parameters governing the state and
    observation processes can be modeled as functions of covariates. References: Kellner
    et al. (2023) <doi:10.1111/2041-210X.14123>, Fiske and Chandler (2011) <doi:10.18637/jss.v043.i10>.'
  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: unmarked
# Version: 1.3.2
# Date: 2023-07-06
# Type: Package
# Title: Models for Data from Unmarked Animals
# Authors@R: c( person("Richard", "Chandler", role="aut"), person("Ken", "Kellner", email="contact@kenkellner.com", role=c("cre", "aut")), person("Ian", "Fiske", role="aut"), person("David", "Miller", role="aut"), person("Andy", "Royle", role="aut"), person("Jeff", "Hostetler", role="aut"), person("Rebecca", "Hutchinson", role="aut"), person("Adam", "Smith", role="aut"), person("Marc", "Kery", role="ctb"), person("Mike", "Meredith", role="ctb"), person("Auriel", "Fournier", role="ctb"), person("Ariel", "Muldoon", role="ctb"), person("Chris", "Baker", role="ctb") )
# Depends: R (>= 2.12.0)
# Imports: graphics, lattice, lme4, MASS, Matrix, methods, parallel, pbapply, Rcpp (>= 0.8.0), stats, TMB (>= 1.7.18), utils
# Suggests: knitr, rmarkdown, pkgdown, raster, shiny, terra, testthat
# Description: Fits hierarchical models of animal abundance and occurrence to data collected using survey methods such as point counts, site occupancy sampling, distance sampling, removal sampling, and double observer sampling. Parameters governing the state and observation processes can be modeled as functions of covariates. References: Kellner et al. (2023) <doi:10.1111/2041-210X.14123>, Fiske and Chandler (2011) <doi:10.18637/jss.v043.i10>.
# License: GPL (>= 3)
# LazyLoad: yes
# LazyData: yes
# Collate: 'classes.R' 'unmarkedEstimate.R' 'mapInfo.R' 'unmarkedFrame.R' 'unmarkedFit.R' 'utils.R' 'getDesign.R' 'colext.R' 'distsamp.R' 'multinomPois.R' 'occu.R' 'occuRN.R' 'occuMulti.R' 'pcount.R' 'gmultmix.R' 'pcountOpen.R' 'gdistsamp.R' 'unmarkedFitList.R' 'unmarkedLinComb.R' 'ranef.R' 'boot.R' 'occuFP.R' 'gpcount.R' 'occuPEN.R' 'pcount.spHDS.R' 'occuMS.R' 'occuTTD.R' 'distsampOpen.R' 'multmixOpen.R' 'unmarkedCrossVal.R' 'piFun.R' 'vif.R' 'makePiFun.R' 'posteriorSamples.R' 'nmixTTD.R' 'gdistremoval.R' 'plotEffects.R' 'mixedModelTools.R' 'power.R' 'simulate.R' 'predict.R' 'RcppExports.R' 'zzz.R'
# LinkingTo: Rcpp, RcppArmadillo, TMB, RcppEigen
# SystemRequirements: GNU make
# URL: https://groups.google.com/d/forum/unmarked, https://rbchan.github.io/unmarked/, https://github.com/ianfiske/unmarked, https://github.com/rbchan/unmarked
# BugReports: https://github.com/rbchan/unmarked/issues
# VignetteBuilder: knitr
# NeedsCompilation: yes
# Packaged: 2023-07-07 19:46:51 UTC; ken
# Author: Richard Chandler [aut], Ken Kellner [cre, aut], Ian Fiske [aut], David Miller [aut], Andy Royle [aut], Jeff Hostetler [aut], Rebecca Hutchinson [aut], Adam Smith [aut], Marc Kery [ctb], Mike Meredith [ctb], Auriel Fournier [ctb], Ariel Muldoon [ctb], Chris Baker [ctb]
# Maintainer: Ken Kellner <contact@kenkellner.com>
# Repository: CRAN
# Date/Publication: 2023-07-08 11:10:02 UTC

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