{% set version = '2.0.1' %}

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

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

source:
  url:
    - {{ cran_mirror }}/src/contrib/glmtlp_{{ version }}.tar.gz
    - {{ cran_mirror }}/src/contrib/Archive/glmtlp/glmtlp_{{ version }}.tar.gz
  sha256: 4a76f430b1ecf13aad5e48e55c8cad98688d01929678a1cafdaf9c151794a32b

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: rmarkdown, knitr, testthat (>= 3.0.0)
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-doparallel
    - r-foreach
    - r-ggplot2

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

test:
  commands:
    # You can put additional test commands to be run here.
    - $R -e "library('glmtlp')"           # [not win]
    - "\"%R%\" -e \"library('glmtlp')\""  # [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://yuyangyy.com/glmtlp/
  license: GPL-3
  summary: Extremely efficient procedures for fitting regularization path with l0, l1, and truncated
    lasso penalty for linear regression and logistic regression models. This version
    is a completely new version compared with our previous version, which was mainly
    based on R. New core algorithms are developed and are now written in C++ and highly
    optimized.
  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: glmtlp
# Type: Package
# Title: Generalized Linear Models with Truncated Lasso Penalty
# Version: 2.0.1
# Date: 2021-12-17
# Authors@R: c( person("Chunlin", "Li", role = "aut"), person("Yu", "Yang", email = "yang6367@umn.edu", role = c("aut", "cre")), person("Chong", "Wu", role = "aut"))
# URL: https://yuyangyy.com/glmtlp/
# Depends: R (>= 3.5.0)
# Imports: foreach, doParallel, ggplot2
# Suggests: rmarkdown, knitr, testthat (>= 3.0.0)
# Description: Extremely efficient procedures for fitting regularization path with l0, l1, and truncated lasso penalty for linear regression and logistic regression models. This version is a completely new version compared with our previous version, which was mainly based on R. New core algorithms are developed and are now written in C++ and highly optimized.
# Encoding: UTF-8
# License: GPL-3
# LazyData: true
# Author: Chunlin Li [aut], Yu Yang [aut, cre], Chong Wu [aut]
# Maintainer: Yu Yang <yang6367@umn.edu>
# RoxygenNote: 7.1.2
# VignetteBuilder: knitr
# Config/testthat/edition: 3
# NeedsCompilation: yes
# Packaged: 2021-12-17 22:42:26 UTC; yuyang
# Repository: CRAN
# Date/Publication: 2021-12-17 23:00:02 UTC

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