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

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

source:
  fn: ISOcodes_{{ version }}.tar.gz
  url:
    - {{ cran_mirror }}/src/contrib/ISOcodes_{{ version }}.tar.gz
    - {{ cran_mirror }}/src/contrib/Archive/ISOcodes/ISOcodes_{{ version }}.tar.gz
  sha256: 57b6c6e335075995d1b56801ed7b3c72b47284cd2fb66de29a8c7e0742b8cbda

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

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

requirements:
  build:

  host:
    - r-base

  run:
    - r-base

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

about:
  home: https://CRAN.R-project.org/package=ISOcodes
  license: GPL-2
  summary: ISO language, territory, currency, script and character codes. Provides ISO 639 language
    codes, ISO 3166 territory codes, ISO 4217 currency codes, ISO 15924 script codes,
    and the ISO 8859 character codes as well as the UN M.49 area codes.
  license_family: GPL2
  license_file: '{{ environ["PREFIX"] }}/lib/R/share/licenses/GPL-2'  # [unix]
  license_file: '{{ environ["PREFIX"] }}\R\share\licenses\GPL-2'  # [win]

extra:
  recipe-maintainers:
    - johanneskoester
    - bgruening
    - daler
    - jdblischak
    - cbrueffer
    - stevierene82
