{% set version = "0.1.7" %}

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

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

source:
  fn: GetoptLong_{{ version }}.tar.gz
  url:
    - https://cran.r-project.org/src/contrib/GetoptLong_{{ version }}.tar.gz
    - https://cran.r-project.org/src/contrib/Archive/GetoptLong/GetoptLong_{{ version }}.tar.gz
  sha256: b9a98881db407eae9b711c4fa9170168fd5f3be1f8485cd8f28d0a60ace083ba

build:
  number: 1
  skip: true  # [win32]

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

requirements:
  build:
    - r-base
    - r-globaloptions >=0.0.10
    - r-rjson

  run:
    - r-base
    - r-globaloptions >=0.0.10
    - r-rjson

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

about:
  home: https://github.com/jokergoo/GetoptLong
  license: GPL (>= 2)
  summary: This is yet another command-line argument parser which wraps the  powerful Perl module
    Getopt::Long and with some adaptation for easier use in R. It also provides a simple
    way for variable interpolation in R.
  license_family: GPL3

extra:
  recipe-maintainers:
    - dpryan79
    - johanneskoester
    - bgruening
    - daler
    - jdblischak
