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

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

source:
  url:
    - {{ cran_mirror }}/src/contrib/swfscMisc_{{ version }}.tar.gz
    - {{ cran_mirror }}/src/contrib/Archive/swfscMisc/swfscMisc_{{ version }}.tar.gz
  sha256: 8018ef8855811c73f7ff8119a2c6a552979eb06fb092a0f3c5267ed47566e222

build:
  merge_build_host: True  # [win]
  number: 1
  rpaths:
    - lib/R/lib/
    - lib/

requirements:
  build:
    - {{posix}}zip               # [win]
  host:
    - r-base
    - r-ggplot2
    - r-mapdata
    - r-maps
    - r-reshape2
    - r-spatstat
  run:
    - r-base
    - r-ggplot2
    - r-mapdata
    - r-maps
    - r-reshape2
    - r-spatstat

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

about:
  home: https://github.com/EricArcher/swfscMisc
  license: GPL (>= 2)
  summary: Collection of conversion, analytical, geodesic, mapping, and plotting functions. Used
    to support packages and code written by researchers at the Southwest Fisheries Science
    Center of the National Oceanic and Atmospheric Administration.
  license_family: GPL3
  license_file: '{{ environ["PREFIX"] }}/lib/R/share/licenses/GPL-3'  # [unix]
  license_file: '{{ environ["PREFIX"] }}\R\share\licenses\GPL-3'  # [win]

extra:
  recipe-maintainers:
    - nick-youngblut
    - johanneskoester
    - bgruening
    - daler
    - jdblischak
    - cbrueffer
    - dbast
