{% set version = '0.12' %}

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

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

source:
  url:
    - {{ cran_mirror }}/src/contrib/mime_{{ version }}.tar.gz
    - {{ cran_mirror }}/src/contrib/Archive/mime/mime_{{ version }}.tar.gz
  sha256: a9001051d6c1e556e881910b1816b42872a1ee41ab76d0040ce66a27135e3849

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/

requirements:
  build:
    - {{ compiler('c') }}              # [not win]
    - {{ compiler('m2w64_c') }}        # [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('mime')"           # [not win]
    - "\"%R%\" -e \"library('mime')\""  # [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://github.com/yihui/mime
  license: GPL-3
  summary: Guesses the MIME type from a filename extension using the data derived from /etc/mime.types
    in UNIX-type systems.
  license_family: GPL3
  license_file:
    - '{{ environ["PREFIX"] }}/lib/R/share/licenses/GPL-3'

extra:
  recipe-maintainers:
    - johanneskoester
    - bgruening
    - mingwandroid

# The original CRAN metadata for this package was:

# Package: mime
# Type: Package
# Title: Map Filenames to MIME Types
# Version: 0.12
# Authors@R: c( person("Yihui", "Xie", role = c("aut", "cre"), email = "xie@yihui.name", comment = c(ORCID = "0000-0003-0645-5666")), person("Jeffrey", "Horner", role = "ctb"), person("Beilei", "Bian", role = "ctb") )
# Description: Guesses the MIME type from a filename extension using the data derived from /etc/mime.types in UNIX-type systems.
# Imports: tools
# License: GPL
# URL: https://github.com/yihui/mime
# BugReports: https://github.com/yihui/mime/issues
# RoxygenNote: 7.1.1
# Encoding: UTF-8
# NeedsCompilation: yes
# Packaged: 2021-09-28 02:06:04 UTC; yihui
# Author: Yihui Xie [aut, cre] (<https://orcid.org/0000-0003-0645-5666>), Jeffrey Horner [ctb], Beilei Bian [ctb]
# Maintainer: Yihui Xie <xie@yihui.name>
# Repository: CRAN
# Date/Publication: 2021-09-28 05:00:05 UTC

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