{% set version = '1.1-1' %}

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

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

source:
  url:
    - {{ cran_mirror }}/src/contrib/uuid_{{ version }}.tar.gz
    - {{ cran_mirror }}/src/contrib/Archive/uuid/uuid_{{ version }}.tar.gz
  sha256: 1611240eb706e6f53400b25c9cf792ad90f151b72ed0918a1e756997f7abb716

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 }}sed               # [win]
    - {{ posix }}grep              # [win]
    - {{ posix }}autoconf
    - {{ posix }}automake          # [not win]
    - {{ posix }}automake-wrapper  # [win]
    - {{ posix }}pkg-config
    - {{ posix }}make
    - {{ 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('uuid')"           # [not win]
    - "\"%R%\" -e \"library('uuid')\""  # [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://www.rforge.net/uuid
  license: MIT
  summary: Tools for generating and handling of UUIDs (Universally Unique Identifiers).
  license_family: MIT
  license_file:
    - '{{ environ["PREFIX"] }}/lib/R/share/licenses/MIT'
    - LICENSE

extra:
  recipe-maintainers:
    - ocefpaf
    - mingwandroid

# The original CRAN metadata for this package was:

# Package: uuid
# Version: 1.1-1
# Title: Tools for Generating and Handling of UUIDs
# Author: Simon Urbanek <Simon.Urbanek@r-project.org> (R package), Theodore Ts'o <tytso@thunk.org> (libuuid)
# Maintainer: Simon Urbanek <Simon.Urbanek@r-project.org>
# Depends: R (>= 2.9.0)
# Description: Tools for generating and handling of UUIDs (Universally Unique Identifiers).
# License: MIT + file LICENSE
# URL: https://www.rforge.net/uuid
# BugReports: https://github.com/s-u/uuid
# NeedsCompilation: yes
# Packaged: 2023-08-17 03:33:22 UTC; rforge
# Repository: CRAN
# Date/Publication: 2023-08-17 06:11:37 UTC

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