{% set version = '0.2.1' %}

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

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

source:
  url: https://github.com/hrbrmstr/mgrs/archive/v{{ version }}.tar.gz
  sha256: d2fe4a4db05ac34bbf0ce945ff08a52d53d762e1d609ed174af13cb0dfd4d03a

build:
  merge_build_host: True  # [win]
  number: 0

  rpaths:
    - lib/R/lib/
    - lib/

# Suggests: testthat, covr
requirements:
  build:
    - {{ compiler('c') }}              # [not win]
    - {{ compiler('m2w64_c') }}        # [win]
    - {{ compiler('cxx') }}            # [not win]
    - {{ compiler('m2w64_cxx') }}      # [win]
    - posix                            # [win]
    - {{posix}}filesystem        # [win]
    - {{posix}}git
    - {{posix}}zip               # [win]

  host:
    - r-base
    - r-rcpp
    - r-magrittr

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

test:
  commands:
    - $R -e "library('mgrs')"           # [not win]
    - "\"%R%\" -e \"library('mgrs')\""  # [win]

about:
  home: https://gitlab.com/hrbrmstr/mgrs
  license: MIT
  summary: The 'Military Grid Reference System' ('MGRS') is the geocoordinate standard used by
    'NATO' militaries for locating points on the earth. The 'MGRS' is derived from the
    'Universal Transverse Mercator' ('UTM') grid system and the universal polar stereographic
    ('UPS') grid system, but uses a different labeling convention. The 'MGRS' is used
    for the entire earth. Methods are provided to convert 'MGRS' coordinates to and
    from other coordinate systems.
  license_family: MIT
  license_file:
    - '{{ environ["PREFIX"] }}/lib/R/share/licenses/MIT'
    - LICENSE

extra:
  recipe-maintainers:
    - conda-forge/r
    - agcopenhaver
    
# The original CRAN metadata for this package was:

# Package: mgrs
# Type: Package
# Title: Convert 'MGRS' ('Military Grid Reference System') Coordinates From/To Other Coordinate Systems
# Version: 0.2.1
# Date: 2019-11-28
# Authors@R: c( person("Bob", "Rudis", email = "bob@rud.is", role = c("aut", "cre"), comment = c(ORCID = "0000-0001-5670-2640")), person("Gregory", "Smith", email = "mith.10305@buckeyemail.osu.edu", role = c("ctb")) )
# Maintainer: Bob Rudis <bob@rud.is>
# Description: The 'Military Grid Reference System' ('MGRS') is the geocoordinate standard used by 'NATO' militaries for locating points on the earth. The 'MGRS' is derived from the 'Universal Transverse Mercator' ('UTM') grid system and the universal polar stereographic ('UPS') grid system, but uses a different labeling convention. The 'MGRS' is used for the entire earth. Methods are provided to convert 'MGRS' coordinates to and from other coordinate systems.
# URL: https://gitlab.com/hrbrmstr/mgrs
# BugReports: https://gitlab.com/hrbrmstr/mgrs/issues
# Encoding: UTF-8
# Copyright: file inst/COPYRIGHTS
# License: MIT + file LICENSE
# Suggests: testthat, covr
# Depends: R (>= 3.2.0)
# Imports: Rcpp, magrittr
# LinkingTo: Rcpp
# RoxygenNote: 6.1.1
